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:
Joseph Doherty
2026-10-07 15:05:49 -04:00
parent 0ffd4bdbea
commit 513fa1aa16
998 changed files with 17896 additions and 2395 deletions
@@ -1,10 +1,11 @@
namespace ZB.MOM.WW.ScadaBridge.NotificationService.Tests;
/// <summary>
/// NS-009: Tests for scrubbing SMTP credential secrets out of log/result text.
/// Tests for scrubbing SMTP credential secrets out of log/result text.
/// </summary>
public class CredentialRedactorTests
{
/// <summary>Verifies that a Basic auth password is masked.</summary>
[Fact]
public void Scrub_BasicAuthPassword_IsMasked()
{
@@ -17,6 +18,7 @@ public class CredentialRedactorTests
Assert.DoesNotContain("svc:Hunter2pass!word", result);
}
/// <summary>Verifies that an OAuth2 client secret is masked.</summary>
[Fact]
public void Scrub_OAuth2ClientSecret_IsMasked()
{
@@ -26,20 +28,23 @@ public class CredentialRedactorTests
Assert.DoesNotContain("Sup3rSecretValue", result);
}
/// <summary>Verifies that null credentials leave the text unchanged.</summary>
[Fact]
public void Scrub_NullCredentials_ReturnsTextUnchanged()
{
Assert.Equal("plain text", CredentialRedactor.Scrub("plain text", null));
}
/// <summary>Verifies that scrubbing null text returns an empty string.</summary>
[Fact]
public void Scrub_NullText_ReturnsEmpty()
{
Assert.Equal(string.Empty, CredentialRedactor.Scrub(null, "user:pass"));
}
// --- NS-025: don't over-mask short non-secret components ---
// --- Don't over-mask short non-secret components ---
/// <summary>Verifies that a short user name is not masked outside the packed credential string.</summary>
[Fact]
public void Scrub_ShortUserName_IsNotMaskedOutsidePackedString()
{
@@ -52,6 +57,7 @@ public class CredentialRedactorTests
Assert.Contains("/root/.config", result);
}
/// <summary>Verifies that a tenant ID is not masked outside the packed credential string.</summary>
[Fact]
public void Scrub_TenantId_IsNotMaskedOutsidePackedString()
{
@@ -63,6 +69,7 @@ public class CredentialRedactorTests
Assert.Contains("tnt-1234567890-abcd", result);
}
/// <summary>Verifies that a full packed credential is always masked regardless of its length.</summary>
[Fact]
public void Scrub_FullPackedCredential_IsAlwaysMaskedRegardlessOfLength()
{