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
@@ -7,7 +7,7 @@ namespace ClawdDotNet.Core.Tests.Deploymentcenter;
|
||||
public sealed class DeploymentcenterApiTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task Token_geht_als_Bearer_mit()
|
||||
public async Task Token_is_sent_as_bearer()
|
||||
{
|
||||
var handler = new CapturingHandler();
|
||||
using var api = new DeploymentcenterApi("https://dc.example", "tok-1", new HttpClient(handler));
|
||||
@@ -18,7 +18,7 @@ public sealed class DeploymentcenterApiTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Fehlerumschlag_wird_zu_einer_Ausnahme_mit_Code()
|
||||
public async Task Error_envelope_becomes_an_exception_with_code()
|
||||
{
|
||||
var handler = new CapturingHandler(HttpStatusCode.Unauthorized,
|
||||
"""{"status":"error","error":{"code":"unauthorized","message":"Kein gueltiges Token."}}""");
|
||||
@@ -37,7 +37,7 @@ public sealed class DeploymentcenterApiTests
|
||||
/// does not answer with a matching HTTP code everywhere.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task Fehlerumschlag_mit_HTTP_200_zaehlt_trotzdem()
|
||||
public async Task Error_envelope_with_HTTP_200_still_counts()
|
||||
{
|
||||
var handler = new CapturingHandler(HttpStatusCode.OK,
|
||||
"""{"status":"error","error":{"code":"rate_limited","message":"Zu viele."}}""");
|
||||
@@ -52,14 +52,14 @@ public sealed class DeploymentcenterApiTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Nicht_HTTPS_wird_abgelehnt()
|
||||
public void Non_HTTPS_is_rejected()
|
||||
{
|
||||
// Over an unsecured connection the token would go in plain text.
|
||||
Should.Throw<ArgumentException>(() => new DeploymentcenterApi("http://dc.example", "tok"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Localhost_darf_auch_ohne_TLS()
|
||||
public void Localhost_is_allowed_without_TLS()
|
||||
{
|
||||
// A local test installation rarely has a certificate, and nobody can listen in
|
||||
// on the own machine.
|
||||
|
||||
@@ -28,7 +28,7 @@ public sealed class ErrorReporterTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Meldung_geht_an_den_Fehler_Endpunkt()
|
||||
public async Task Report_goes_to_the_error_endpoint()
|
||||
{
|
||||
var (reporter, handler) = Build();
|
||||
using var _ = reporter;
|
||||
@@ -49,7 +49,7 @@ public sealed class ErrorReporterTests
|
||||
/// after the requests have already gone over the line.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task Derselbe_Fehler_geht_nur_einmal_je_Zeitfenster_raus()
|
||||
public async Task The_same_error_goes_out_only_once_per_time_window()
|
||||
{
|
||||
var now = DateTimeOffset.UtcNow;
|
||||
var (reporter, handler) = Build(() => now);
|
||||
@@ -65,7 +65,7 @@ public sealed class ErrorReporterTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Nach_dem_Zeitfenster_wird_wieder_gemeldet()
|
||||
public async Task After_the_time_window_it_is_reported_again()
|
||||
{
|
||||
var now = DateTimeOffset.UtcNow;
|
||||
var (reporter, handler) = Build(() => now);
|
||||
@@ -85,7 +85,7 @@ public sealed class ErrorReporterTests
|
||||
/// original error would get lost in the process.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task Ein_abgelehnter_Aufruf_wirft_nicht_nach_aussen()
|
||||
public async Task A_rejected_call_does_not_throw_outward()
|
||||
{
|
||||
var (reporter, _) = Build(status: HttpStatusCode.Unauthorized);
|
||||
using var __ = reporter;
|
||||
|
||||
@@ -25,7 +25,7 @@ public sealed class InstanceHealthProviderTests
|
||||
new(DateOnly.FromDateTime(DateTime.Now), tokens, 0, cost, true, 1);
|
||||
|
||||
[Fact]
|
||||
public async Task Ohne_API_Key_meldet_error()
|
||||
public async Task Without_API_key_reports_error()
|
||||
{
|
||||
var provider = new InstanceHealthProvider(
|
||||
"Test", agentsEnabled: false, InstanceBudget.Unlimited,
|
||||
@@ -39,7 +39,7 @@ public sealed class InstanceHealthProviderTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Erschoepftes_Kostenbudget_meldet_warning()
|
||||
public async Task Exhausted_cost_budget_reports_warning()
|
||||
{
|
||||
var budget = new InstanceBudget { DailyCostUsd = 5m };
|
||||
var provider = new InstanceHealthProvider(
|
||||
@@ -58,7 +58,7 @@ public sealed class InstanceHealthProviderTests
|
||||
/// instance no longer works through anything — and exactly that is what the check should make visible.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task Stehender_Scanner_meldet_warning()
|
||||
public async Task Stalled_scanner_reports_warning()
|
||||
{
|
||||
var provider = new InstanceHealthProvider(
|
||||
"Test", agentsEnabled: true, InstanceBudget.Unlimited,
|
||||
@@ -72,7 +72,7 @@ public sealed class InstanceHealthProviderTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Normalbetrieb_meldet_ok_mit_Metriken()
|
||||
public async Task Normal_operation_reports_ok_with_metrics()
|
||||
{
|
||||
var provider = new InstanceHealthProvider(
|
||||
"Test", agentsEnabled: true, InstanceBudget.Unlimited,
|
||||
@@ -93,7 +93,7 @@ public sealed class InstanceHealthProviderTests
|
||||
/// the history silently discards. Descriptive things belong in the message.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task Instanzname_steht_in_der_Meldung_nicht_in_den_Metriken()
|
||||
public async Task Instance_name_is_in_the_message_not_in_the_metrics()
|
||||
{
|
||||
var provider = new InstanceHealthProvider(
|
||||
"Produktion", agentsEnabled: true, InstanceBudget.Unlimited,
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ClawdDotNet.Core.Tests.Deploymentcenter;
|
||||
public sealed class TokenProvisionerTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task Instanz_bekommt_ein_eigenes_Sub_Token()
|
||||
public async Task Instance_gets_its_own_sub_token()
|
||||
{
|
||||
var handler = new CapturingHandler(HttpStatusCode.Created,
|
||||
"""
|
||||
@@ -35,7 +35,7 @@ public sealed class TokenProvisionerTests
|
||||
/// start and must come out as a clean error, not as a crash.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task Abgelehnte_Provisionierung_wirft_mit_Code()
|
||||
public async Task Rejected_provisioning_throws_with_code()
|
||||
{
|
||||
var handler = new CapturingHandler(HttpStatusCode.Forbidden,
|
||||
"""{"status":"error","error":{"code":"provision_denied","message":"Kein Master-Token."}}""");
|
||||
@@ -58,7 +58,7 @@ public sealed class TokenProvisionerTests
|
||||
/// Supervision would look like "nothing unusual".</para>
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task Whoami_liest_die_Projektbindung()
|
||||
public async Task Whoami_reads_the_project_binding()
|
||||
{
|
||||
var handler = new CapturingHandler(HttpStatusCode.OK,
|
||||
"""
|
||||
@@ -83,7 +83,7 @@ public sealed class TokenProvisionerTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Ein_Token_ohne_Projekt_faellt_auf()
|
||||
public async Task A_token_without_project_is_noticed()
|
||||
{
|
||||
// project_slug is JSON null, not absent - exactly as it comes from the server.
|
||||
var handler = new CapturingHandler(HttpStatusCode.OK,
|
||||
@@ -101,7 +101,7 @@ public sealed class TokenProvisionerTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Eine_Antwort_ohne_Felder_wirft_nicht()
|
||||
public async Task An_answer_without_fields_does_not_throw()
|
||||
{
|
||||
// An older server does not know whoami in this form. The information may
|
||||
// be missing; it must not crash.
|
||||
|
||||
@@ -19,7 +19,7 @@ public sealed class WatchdogClientTests
|
||||
=> new(status, message, metrics ?? [], checks ?? []);
|
||||
|
||||
[Fact]
|
||||
public async Task Heartbeat_geht_an_den_v1_Pfad_mit_Bearer_Token()
|
||||
public async Task Heartbeat_goes_to_the_v1_path_with_bearer_token()
|
||||
{
|
||||
var handler = new CapturingHandler();
|
||||
|
||||
@@ -42,7 +42,7 @@ public sealed class WatchdogClientTests
|
||||
/// the old version".
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task Heartbeat_traegt_die_Anwendungsversion()
|
||||
public async Task Heartbeat_carries_the_application_version()
|
||||
{
|
||||
var handler = new CapturingHandler();
|
||||
|
||||
@@ -57,7 +57,7 @@ public sealed class WatchdogClientTests
|
||||
/// otherwise they overwrite each other, and the failure of one would stay invisible.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task Jede_Instanz_meldet_unter_eigenem_Instanznamen()
|
||||
public async Task Every_instance_reports_under_its_own_instance_name()
|
||||
{
|
||||
var first = new CapturingHandler();
|
||||
var second = new CapturingHandler();
|
||||
@@ -70,7 +70,7 @@ public sealed class WatchdogClientTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Checks_und_Metriken_gehen_mit()
|
||||
public async Task Checks_and_metrics_go_along()
|
||||
{
|
||||
var handler = new CapturingHandler();
|
||||
|
||||
@@ -89,7 +89,7 @@ public sealed class WatchdogClientTests
|
||||
|
||||
/// <summary>Empty details are left out instead of appearing as an empty object.</summary>
|
||||
[Fact]
|
||||
public async Task Ohne_Checks_und_Metriken_bleiben_die_Felder_weg()
|
||||
public async Task Without_checks_and_metrics_the_fields_are_left_out()
|
||||
{
|
||||
var handler = new CapturingHandler();
|
||||
|
||||
@@ -100,7 +100,7 @@ public sealed class WatchdogClientTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Antwort_liefert_Zustand_und_fehlgeschlagene_Pruefungen()
|
||||
public async Task Answer_returns_state_and_failed_checks()
|
||||
{
|
||||
var handler = new CapturingHandler(HttpStatusCode.OK,
|
||||
"""{"status":"success","monitor":{"state":"warning","failing_checks":["scheduler"]}}""");
|
||||
@@ -112,7 +112,7 @@ public sealed class WatchdogClientTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Ereignis_geht_an_den_Event_Endpunkt()
|
||||
public async Task Event_goes_to_the_event_endpoint()
|
||||
{
|
||||
var handler = new CapturingHandler();
|
||||
|
||||
@@ -124,7 +124,7 @@ public sealed class WatchdogClientTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Abgelehntes_Token_wirft_mit_Code()
|
||||
public async Task Rejected_token_throws_with_code()
|
||||
{
|
||||
var handler = new CapturingHandler(HttpStatusCode.Unauthorized,
|
||||
"""{"status":"error","error":{"code":"unauthorized","message":"Kein gueltiges Token."}}""");
|
||||
|
||||
@@ -36,7 +36,7 @@ public sealed class WatchdogHeartbeatServiceTests
|
||||
new(client, new FixedHealth(InstanceHealth.Ok("läuft")), 3600, NullLogger.Instance);
|
||||
|
||||
[Fact]
|
||||
public async Task Regulaeres_Ende_meldet_stopped()
|
||||
public async Task Regular_end_reports_stopped()
|
||||
{
|
||||
var client = new RecordingClient();
|
||||
var service = Build(client);
|
||||
@@ -53,7 +53,7 @@ public sealed class WatchdogHeartbeatServiceTests
|
||||
/// the wrong information: the monitor would be left alone until someone touches it.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task Angekuendigte_Wartung_meldet_maintenance()
|
||||
public async Task Announced_maintenance_reports_maintenance()
|
||||
{
|
||||
var client = new RecordingClient();
|
||||
var service = Build(client);
|
||||
@@ -71,7 +71,7 @@ public sealed class WatchdogHeartbeatServiceTests
|
||||
|
||||
/// <summary>The first beat goes out immediately, not only after a full interval.</summary>
|
||||
[Fact]
|
||||
public async Task Erster_Heartbeat_kommt_sofort()
|
||||
public async Task First_heartbeat_comes_immediately()
|
||||
{
|
||||
var client = new RecordingClient();
|
||||
var service = Build(client);
|
||||
|
||||
Reference in New Issue
Block a user