docs(tests): fix CommentChecker findings across tests/ — 13,392 → 0 (repo-wide scan clean)
Comment/XML-doc changes only: - add summaries to ~10k test methods, fixtures, fakes and helpers (+ <param> on theories, <returns> on async Task methods, <inheritdoc/> on interface implementations the checker can resolve) - strip ~2.6k project-tracking references (WP*, P*-*, row-NN, Task N, #NN, Component-0NN) from comments, keeping the explanatory text; reword false positives in comments only - real docs on fakes implementing BCL/library interfaces (IDisposable, ILogger, IOptionsMonitor, IAsyncLifetime) - reword the last 5 src/ false positives (CWE-1236, failures-1, year-0001, M365) Only non-comment edits: four one-line nested classes split across lines so members can carry docs. Build 0 errors / 0 warnings.
This commit is contained in:
+7
-1
@@ -5,7 +5,7 @@ using ZB.MOM.WW.ScadaBridge.Commons.Types.Audit;
|
||||
namespace ZB.MOM.WW.ScadaBridge.AuditLog.Tests.Redaction;
|
||||
|
||||
/// <summary>
|
||||
/// ScadaBridge audit re-architecture stage C2 (Task 2.5) tests for
|
||||
/// Tests for
|
||||
/// <see cref="SafeDefaultAuditRedactor"/> — the minimal always-safe
|
||||
/// <see cref="ZB.MOM.WW.Audit.IAuditRedactor"/> fallback.
|
||||
/// Header-only scrub of the always-sensitive default headers inside
|
||||
@@ -35,6 +35,7 @@ public class SafeDefaultAuditRedactorTests
|
||||
private static AuditDetails Details(AuditEvent evt) =>
|
||||
AuditDetailsCodec.Deserialize(evt.DetailsJson);
|
||||
|
||||
/// <summary>Verifies that the default sensitive headers are redacted in the request summary.</summary>
|
||||
[Fact]
|
||||
public void Redacts_DefaultSensitiveHeaders_InRequestSummary()
|
||||
{
|
||||
@@ -48,6 +49,7 @@ public class SafeDefaultAuditRedactorTests
|
||||
Assert.Contains("Content-Type: application/json", d.RequestSummary!);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the default sensitive headers are redacted in the response summary.</summary>
|
||||
[Fact]
|
||||
public void Redacts_DefaultSensitiveHeaders_InResponseSummary()
|
||||
{
|
||||
@@ -61,6 +63,7 @@ public class SafeDefaultAuditRedactorTests
|
||||
Assert.Contains("X-Other: ok", d.ResponseSummary!);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that header names are matched case-insensitively when redacting.</summary>
|
||||
[Fact]
|
||||
public void CaseInsensitive_HeaderName_Redacted()
|
||||
{
|
||||
@@ -72,6 +75,7 @@ public class SafeDefaultAuditRedactorTests
|
||||
Assert.DoesNotContain("x-y-z", Details(result).RequestSummary!);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a non-sensitive header is preserved unchanged.</summary>
|
||||
[Fact]
|
||||
public void NonSensitiveHeader_Preserved()
|
||||
{
|
||||
@@ -84,6 +88,7 @@ public class SafeDefaultAuditRedactorTests
|
||||
Assert.Contains("Accept: application/json", d.RequestSummary!);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an event with null details takes the fast path and returns the same instance.</summary>
|
||||
[Fact]
|
||||
public void NullDetails_FastPath_ReturnsSameInstance()
|
||||
{
|
||||
@@ -102,6 +107,7 @@ public class SafeDefaultAuditRedactorTests
|
||||
Assert.Same(evt, result);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that malformed details JSON never causes the redactor to throw.</summary>
|
||||
[Fact]
|
||||
public void MalformedDetailsJson_NeverThrows()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user