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
@@ -16,7 +16,7 @@ public sealed class TaskScheduleTests
|
||||
// ─── #597: invalid cron expression ───
|
||||
|
||||
[Fact]
|
||||
public void Ungueltiger_Cron_Ausdruck_wird_benannt_statt_verschwiegen()
|
||||
public void Invalid_cron_expression_is_named_instead_of_hidden()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -29,7 +29,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Nachrichten_Digest_aus_dem_Testbetrieb_ist_um_13_Uhr_faellig()
|
||||
public void News_digest_from_test_operation_is_due_at_13_o_clock()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -43,7 +43,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Andere_Terminarten_haben_keinen_Cron_Fehler()
|
||||
public void Other_schedule_kinds_have_no_cron_error()
|
||||
=> TaskSchedule.InvalidCron(new TaskItem
|
||||
{
|
||||
Id = "t-1", When = new TaskWhen { Kind = TaskWhenKind.Every, Value = "kaputt" }
|
||||
@@ -52,7 +52,7 @@ public sealed class TaskScheduleTests
|
||||
// ─── One-time, without a schedule ───
|
||||
|
||||
[Fact]
|
||||
public void Ohne_Termin_ist_die_Aufgabe_faellig_bis_sie_lief()
|
||||
public void Without_schedule_the_task_is_due_until_it_ran()
|
||||
{
|
||||
var task = new TaskItem { Id = "t-1", CreatedAt = Utc(2026, 7, 31, 6, 0) };
|
||||
|
||||
@@ -63,7 +63,7 @@ public sealed class TaskScheduleTests
|
||||
// ─── at: one-time point in time ───
|
||||
|
||||
[Fact]
|
||||
public void Ein_at_Termin_ist_erst_ab_dem_Zeitpunkt_faellig()
|
||||
public void An_at_schedule_is_only_due_from_its_time()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -77,7 +77,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Ein_at_Termin_feuert_genau_einmal()
|
||||
public void An_at_schedule_fires_exactly_once()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -90,7 +90,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Ein_at_Termin_mit_Z_wird_als_UTC_gedeutet()
|
||||
public void An_at_schedule_with_Z_is_interpreted_as_UTC()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -105,7 +105,7 @@ public sealed class TaskScheduleTests
|
||||
// ─── every: interval ───
|
||||
|
||||
[Fact]
|
||||
public void Ein_Intervall_wird_erst_nach_Ablauf_faellig()
|
||||
public void An_interval_only_becomes_due_after_it_elapses()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -119,7 +119,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Nach_dem_Marker_zaehlt_das_Intervall_neu()
|
||||
public void After_the_marker_the_interval_counts_anew()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -135,7 +135,7 @@ public sealed class TaskScheduleTests
|
||||
// ─── cron: with time zone (the core of B7) ───
|
||||
|
||||
[Fact]
|
||||
public void Ein_Cron_Termin_wird_in_seiner_Zeitzone_gedeutet_Sommer()
|
||||
public void A_cron_schedule_is_interpreted_in_its_time_zone_summer()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -150,7 +150,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Derselbe_Cron_liegt_im_Winter_auf_einer_anderen_UTC_Stunde()
|
||||
public void The_same_cron_lands_on_a_different_UTC_hour_in_winter()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -165,7 +165,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Vor_der_geplanten_Zeit_ist_der_Cron_nicht_faellig()
|
||||
public void Before_the_planned_time_the_cron_is_not_due()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -179,7 +179,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Eine_frische_Cron_Aufgabe_holt_keinen_Termin_von_vor_ihrer_Anlage_nach()
|
||||
public void A_fresh_cron_task_does_not_catch_up_an_occurrence_from_before_its_creation()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -193,7 +193,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Derselbe_Cron_Termin_feuert_nicht_zweimal()
|
||||
public void The_same_cron_occurrence_does_not_fire_twice()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -210,7 +210,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Ein_kaputter_Cron_Ausdruck_kippt_den_Scanner_nicht()
|
||||
public void A_broken_cron_expression_does_not_topple_the_scanner()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -228,7 +228,7 @@ public sealed class TaskScheduleTests
|
||||
/// being noticed anywhere. Now it does not fire at all — and the scanner reports once why.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Eine_unbekannte_Zeitzone_laesst_den_Termin_nicht_faellig_werden()
|
||||
public void An_unknown_time_zone_does_not_make_the_schedule_due()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -249,7 +249,7 @@ public sealed class TaskScheduleTests
|
||||
[Theory]
|
||||
[InlineData("Europe/Berlin")]
|
||||
[InlineData("W. Europe Standard Time")]
|
||||
public void Beide_Schreibweisen_derselben_Zone_ergeben_dieselbe_Feuerzeit(string tz)
|
||||
public void Both_spellings_of_the_same_zone_give_the_same_fire_time(string tz)
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -266,7 +266,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Keine_Zeitzonenangabe_bedeutet_weiterhin_UTC()
|
||||
public void No_time_zone_still_means_UTC()
|
||||
{
|
||||
var task = new TaskItem
|
||||
{
|
||||
@@ -289,18 +289,18 @@ public sealed class TaskScheduleTests
|
||||
// twice.
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
|
||||
private static TaskItem TaeglichUmZwei(DateTime angelegt) => new()
|
||||
private static TaskItem DailyAtTwo(DateTime created) => new()
|
||||
{
|
||||
Id = "t-dst",
|
||||
CreatedAt = angelegt,
|
||||
CreatedAt = created,
|
||||
When = new TaskWhen { Kind = TaskWhenKind.Cron, Value = "0 2 * * *", TimeZone = "Europe/Berlin" }
|
||||
};
|
||||
|
||||
/// <summary>R5 — the case #235 is about.</summary>
|
||||
[Fact]
|
||||
public void Zeitumstellung_Maerz_wird_nicht_uebersprungen()
|
||||
public void DST_change_in_March_is_not_skipped()
|
||||
{
|
||||
var task = TaeglichUmZwei(Utc(2026, 3, 28, 0, 0));
|
||||
var task = DailyAtTwo(Utc(2026, 3, 28, 0, 0));
|
||||
|
||||
// "02:00" does not exist on 29 March. The occurrence still happens, namely
|
||||
// at the first point in time after it: 03:00 CEST = 01:00 UTC.
|
||||
@@ -310,39 +310,39 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Der_verschobene_Termin_feuert_trotzdem_nur_einmal()
|
||||
public void The_shifted_occurrence_still_fires_only_once()
|
||||
{
|
||||
var task = TaeglichUmZwei(Utc(2026, 3, 28, 0, 0));
|
||||
var task = DailyAtTwo(Utc(2026, 3, 28, 0, 0));
|
||||
|
||||
var ersteFaelligkeit = TaskSchedule.DueOccurrence(task, Utc(2026, 3, 29, 2, 0));
|
||||
ersteFaelligkeit.ShouldNotBeNull();
|
||||
var firstDue = TaskSchedule.DueOccurrence(task, Utc(2026, 3, 29, 2, 0));
|
||||
firstDue.ShouldNotBeNull();
|
||||
|
||||
TaskSchedule.DueOccurrence(task with { LastOccurrence = ersteFaelligkeit }, Utc(2026, 3, 29, 2, 30))
|
||||
TaskSchedule.DueOccurrence(task with { LastOccurrence = firstDue }, Utc(2026, 3, 29, 2, 30))
|
||||
.ShouldBeNull();
|
||||
}
|
||||
|
||||
/// <summary>R4 — the other direction.</summary>
|
||||
[Fact]
|
||||
public void Zeitumstellung_Oktober_feuert_genau_einmal()
|
||||
public void DST_change_in_October_fires_exactly_once()
|
||||
{
|
||||
var task = TaeglichUmZwei(Utc(2026, 10, 24, 0, 0));
|
||||
var task = DailyAtTwo(Utc(2026, 10, 24, 0, 0));
|
||||
|
||||
// 02:00 occurs twice on 25 October: in summer time (00:00 UTC) and in
|
||||
// standard time (01:00 UTC). Both passes result in the same occurrence key —
|
||||
// the marker catches the second.
|
||||
var ersterDurchlauf = TaskSchedule.DueOccurrence(task, Utc(2026, 10, 25, 0, 30));
|
||||
ersterDurchlauf.ShouldNotBeNull();
|
||||
var firstPass = TaskSchedule.DueOccurrence(task, Utc(2026, 10, 25, 0, 30));
|
||||
firstPass.ShouldNotBeNull();
|
||||
|
||||
var zweiterDurchlauf = TaskSchedule.DueOccurrence(
|
||||
task with { LastOccurrence = ersterDurchlauf }, Utc(2026, 10, 25, 1, 30));
|
||||
zweiterDurchlauf.ShouldBeNull();
|
||||
var secondPass = TaskSchedule.DueOccurrence(
|
||||
task with { LastOccurrence = firstPass }, Utc(2026, 10, 25, 1, 30));
|
||||
secondPass.ShouldBeNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void An_gewoehnlichen_Tagen_bleibt_es_bei_zwei_Uhr_Ortszeit()
|
||||
public void On_ordinary_days_it_stays_at_two_o_clock_local_time()
|
||||
{
|
||||
// The counter-check: the shift may only apply in the gap.
|
||||
var task = TaeglichUmZwei(Utc(2026, 3, 21, 0, 0));
|
||||
var task = DailyAtTwo(Utc(2026, 3, 21, 0, 0));
|
||||
|
||||
// 02:00 CET = 01:00 UTC.
|
||||
TaskSchedule.DueOccurrence(task, Utc(2026, 3, 22, 2, 0))
|
||||
@@ -350,7 +350,7 @@ public sealed class TaskScheduleTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Auch_ein_einmaliger_Termin_in_der_Luecke_faellt_nicht_aus()
|
||||
public void A_one_off_schedule_in_the_gap_is_not_skipped_either()
|
||||
{
|
||||
// The same handling on the at path — the same rule and the same gap applied there.
|
||||
var task = new TaskItem
|
||||
|
||||
Reference in New Issue
Block a user