Stufe 4c (#764): Bezeichner auf Englisch - Typen, Methoden, Felder, Parameter, Locals, Testnamen
Mit Roslyn umbenannt (Verweise folgen, Zeichenketten bleiben unberuehrt). Nicht umbenannt, weil gespeichert oder ueber die API gebunden (Stufe 4e): Properties, Record-Parameter, Enum-Member sowie die Parameter der Endpunkt-Handler (Routen-/Query-Bindung ueber den Namen). Die JSON-Felder anonymer Objekte bleiben ausdruecklich benannt (JsonFilter: pfad). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
837a634a22
commit
77062facc9
@@ -17,7 +17,7 @@ public sealed class CronExpressionTests
|
||||
// ─── R1: correct next points in time ───
|
||||
|
||||
[Fact]
|
||||
public void Alle_30_Minuten()
|
||||
public void Every_30_minutes()
|
||||
{
|
||||
var cron = CronExpression.Parse("*/30 * * * *");
|
||||
cron.GetNextOccurrence(Local(2026, 7, 31, 10, 5)).ShouldBe(Local(2026, 7, 31, 10, 30));
|
||||
@@ -25,7 +25,7 @@ public sealed class CronExpressionTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Werktags_um_drei_Uhr_frueh()
|
||||
public void Weekdays_at_three_in_the_morning()
|
||||
{
|
||||
var cron = CronExpression.Parse("0 3 * * 1-5"); // Mo–Fr
|
||||
// 2026-08-01 is a Saturday → next run Monday, 2026-08-03 03:00
|
||||
@@ -33,7 +33,7 @@ public sealed class CronExpressionTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Listen_von_Minuten()
|
||||
public void Lists_of_minutes()
|
||||
{
|
||||
var cron = CronExpression.Parse("15,45 * * * *");
|
||||
cron.GetNextOccurrence(Local(2026, 7, 31, 10, 20)).ShouldBe(Local(2026, 7, 31, 10, 45));
|
||||
@@ -41,7 +41,7 @@ public sealed class CronExpressionTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Schaltjahr_29_Februar()
|
||||
public void Leap_year_29_February()
|
||||
{
|
||||
var cron = CronExpression.Parse("0 0 29 2 *"); // only on 29 Feb
|
||||
// 2028 is the next leap year
|
||||
@@ -49,7 +49,7 @@ public sealed class CronExpressionTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Bereich_mit_Schritt_alle_drei_Stunden_tagsueber()
|
||||
public void Range_with_step_every_three_hours_during_the_day()
|
||||
{
|
||||
// #597: "0 7-22/3 * * *" used to throw a FormatException, the task never ran.
|
||||
var cron = CronExpression.Parse("0 7-22/3 * * *"); // 7, 10, 13, 16, 19, 22
|
||||
@@ -59,7 +59,7 @@ public sealed class CronExpressionTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Zahl_mit_Schritt_laeuft_bis_zum_Feldende()
|
||||
public void Number_with_step_runs_to_the_end_of_the_field()
|
||||
{
|
||||
var cron = CronExpression.Parse("10/20 * * * *"); // 10, 30, 50
|
||||
cron.GetNextOccurrence(Local(2026, 9, 14, 12, 31)).ShouldBe(Local(2026, 9, 14, 12, 50));
|
||||
@@ -73,7 +73,7 @@ public sealed class CronExpressionTests
|
||||
[InlineData("0 3 * * 1-5")]
|
||||
[InlineData("15,45 9-17 * * *")]
|
||||
[InlineData("0 0 1 * *")]
|
||||
public void Der_naechste_Termin_liegt_echt_in_der_Zukunft_und_passt(string expr)
|
||||
public void The_next_occurrence_is_strictly_in_the_future_and_matches(string expr)
|
||||
{
|
||||
var cron = CronExpression.Parse(expr);
|
||||
var now = Local(2026, 7, 31, 10, 23);
|
||||
@@ -99,11 +99,11 @@ public sealed class CronExpressionTests
|
||||
[InlineData("0 7-25/3 * * *")] // range end outside 0-23
|
||||
[InlineData("0 7-/3 * * *")] // half a range
|
||||
[InlineData("* * * * ")] // an empty field after trim → 4 fields
|
||||
public void Ungueltige_Ausdruecke_werfen_eine_saubere_FormatException(string expr)
|
||||
public void Invalid_expressions_throw_a_clean_FormatException(string expr)
|
||||
=> Should.Throw<FormatException>(() => CronExpression.Parse(expr));
|
||||
|
||||
[Fact]
|
||||
public void Ein_gueltiger_Ausdruck_mit_Schritt_bleibt_endlich()
|
||||
public void A_valid_expression_with_step_stays_finite()
|
||||
{
|
||||
// Regression guard: */0 would formerly have produced an endless loop.
|
||||
Should.CompleteIn(() => CronExpression.Parse("*/15 * * * *"), TimeSpan.FromSeconds(2));
|
||||
|
||||
@@ -18,36 +18,36 @@ public sealed class TimeZonesTests
|
||||
[InlineData("America/New_York")]
|
||||
[InlineData("Eastern Standard Time")]
|
||||
[InlineData("UTC")]
|
||||
public void Beide_Schreibweisen_sind_aufloesbar(string id)
|
||||
public void Both_spellings_can_be_resolved(string id)
|
||||
{
|
||||
TimeZones.TryResolve(id).ShouldNotBeNull();
|
||||
TimeZones.IsKnown(id).ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Beide_Schreibweisen_meinen_dieselbe_Zone()
|
||||
public void Both_spellings_mean_the_same_zone()
|
||||
{
|
||||
var iana = TimeZones.TryResolve("Europe/Berlin");
|
||||
var windows = TimeZones.TryResolve("W. Europe Standard Time");
|
||||
|
||||
var sommer = new DateTime(2026, 7, 31, 12, 0, 0, DateTimeKind.Utc);
|
||||
var summer = new DateTime(2026, 7, 31, 12, 0, 0, DateTimeKind.Utc);
|
||||
|
||||
iana!.GetUtcOffset(sommer).ShouldBe(windows!.GetUtcOffset(sommer));
|
||||
iana.GetUtcOffset(sommer).ShouldBe(TimeSpan.FromHours(2)); // CEST
|
||||
iana!.GetUtcOffset(summer).ShouldBe(windows!.GetUtcOffset(summer));
|
||||
iana.GetUtcOffset(summer).ShouldBe(TimeSpan.FromHours(2)); // CEST
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("Phantasie/Ort")]
|
||||
[InlineData("Nicht Existierende Standard Time")]
|
||||
[InlineData("völliger Unsinn")]
|
||||
public void Unbekannte_Kennungen_werden_gemeldet_statt_geraten(string id)
|
||||
public void Unknown_identifiers_are_reported_instead_of_guessed(string id)
|
||||
{
|
||||
TimeZones.TryResolve(id).ShouldBeNull();
|
||||
TimeZones.IsKnown(id).ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Leer_gilt_als_gueltig_denn_es_bedeutet_keine_Angabe()
|
||||
public void Empty_counts_as_valid_because_it_means_no_value()
|
||||
{
|
||||
TimeZones.IsKnown("").ShouldBeTrue();
|
||||
TimeZones.IsKnown(null).ShouldBeTrue();
|
||||
@@ -58,13 +58,13 @@ public sealed class TimeZonesTests
|
||||
[InlineData("W. Europe Standard Time", "Europe/Berlin")]
|
||||
[InlineData("Europe/Berlin", "Europe/Berlin")]
|
||||
[InlineData("", "")]
|
||||
public void Normalisieren_ergibt_die_IANA_Schreibweise(string input, string expected)
|
||||
public void Normalising_gives_the_IANA_form(string input, string expected)
|
||||
{
|
||||
TimeZones.ToIana(input).ShouldBe(expected);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Eine_nicht_umsetzbare_Kennung_bleibt_unveraendert()
|
||||
public void An_unconvertible_identifier_stays_unchanged()
|
||||
{
|
||||
// Falsifying would be worse than passing through — that way, in case of doubt,
|
||||
// what originally stood there stays visible.
|
||||
@@ -72,7 +72,7 @@ public sealed class TimeZonesTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Die_lokale_Zone_wird_in_IANA_Schreibweise_geliefert()
|
||||
public void The_local_zone_is_returned_in_IANA_form()
|
||||
{
|
||||
var local = TimeZones.LocalIanaId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user