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
@@ -22,7 +22,7 @@ public sealed class UrlSanitizerTests
|
||||
[InlineData("https://api.example.com/v1?ApiKey=GEHEIM-abc123XYZ&other=2")]
|
||||
[InlineData("https://api.example.com/v1?secret=GEHEIM-abc123XYZ")]
|
||||
[InlineData("https://api.example.com/v1?a=1&apikey=GEHEIM-abc123XYZ#fragment")]
|
||||
public void Sensible_Parameter_werden_maskiert(string url)
|
||||
public void Sensitive_parameters_are_masked(string url)
|
||||
{
|
||||
var sanitized = UrlSanitizer.Sanitize(url);
|
||||
|
||||
@@ -31,7 +31,7 @@ public sealed class UrlSanitizerTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Harmlose_Parameter_bleiben_lesbar()
|
||||
public void Harmless_parameters_stay_readable()
|
||||
{
|
||||
var sanitized = UrlSanitizer.Sanitize(
|
||||
"https://api.twelvedata.com/quote?symbol=NVDA&interval=1day&apikey=GEHEIM-abc123XYZ");
|
||||
@@ -42,7 +42,7 @@ public sealed class UrlSanitizerTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Der_Pfad_bleibt_erhalten()
|
||||
public void The_path_is_kept()
|
||||
{
|
||||
var sanitized = UrlSanitizer.Sanitize("https://api.massive.com/v2/aggs/ticker/NVDA?apikey=x");
|
||||
|
||||
@@ -50,7 +50,7 @@ public sealed class UrlSanitizerTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Ein_Fragment_bleibt_erhalten()
|
||||
public void A_fragment_is_kept()
|
||||
{
|
||||
var sanitized = UrlSanitizer.Sanitize("https://x.de/a?apikey=geheim#abschnitt");
|
||||
|
||||
@@ -61,7 +61,7 @@ public sealed class UrlSanitizerTests
|
||||
[Theory]
|
||||
[InlineData("https://api.example.com/v1")]
|
||||
[InlineData("https://api.example.com/v1?symbol=NVDA")]
|
||||
public void URLs_ohne_sensible_Parameter_bleiben_unveraendert(string url)
|
||||
public void URLs_without_sensitive_parameters_stay_unchanged(string url)
|
||||
{
|
||||
UrlSanitizer.Sanitize(url).ShouldBe(url);
|
||||
}
|
||||
@@ -70,13 +70,13 @@ public sealed class UrlSanitizerTests
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
[InlineData(" ")]
|
||||
public void Leere_Eingaben_fuehren_nicht_zu_einem_Fehler(string? url)
|
||||
public void Empty_inputs_do_not_lead_to_an_error(string? url)
|
||||
{
|
||||
Should.NotThrow(() => UrlSanitizer.Sanitize(url));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Ein_Parameter_ohne_Wert_stoert_nicht()
|
||||
public void A_parameter_without_value_does_no_harm()
|
||||
{
|
||||
var sanitized = UrlSanitizer.Sanitize("https://x.de/a?flag&apikey=geheim");
|
||||
|
||||
@@ -85,7 +85,7 @@ public sealed class UrlSanitizerTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Ein_Schluessel_als_Teil_eines_anderen_Namens_wird_nicht_faelschlich_maskiert()
|
||||
public void A_key_as_part_of_another_name_is_not_wrongly_masked()
|
||||
{
|
||||
// "monkey" contains "key", but is not a sensitive parameter.
|
||||
var sanitized = UrlSanitizer.Sanitize("https://x.de/a?monkey=banane");
|
||||
|
||||
Reference in New Issue
Block a user