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
@@ -5,13 +5,14 @@ namespace ZB.MOM.WW.ScadaBridge.CLI.Tests;
/// <summary>
/// Regression tests for the testable pieces of <c>DebugCommands.StreamDebugAsync</c>:
/// CLI-010 (Ctrl+C during connect misreported as a connection failure) and
/// CLI-012 (non-deterministic exit code after stream termination).
/// Ctrl+C during connect being misreported as a connection failure, and
/// non-deterministic exit codes after stream termination.
/// </summary>
public class DebugStreamTests
{
// --- CLI-010: connect-failure classification --------------------------------------
// --- connect-failure classification --------------------------------------
/// <summary>Verifies that an <see cref="OperationCanceledException"/> raised after cancellation was requested is treated as a graceful cancellation.</summary>
[Fact]
public void ClassifyConnectFailure_OperationCanceled_IsTreatedAsCancellation()
{
@@ -24,6 +25,7 @@ public class DebugStreamTests
Assert.Equal(0, result.ExitCode);
}
/// <summary>Verifies that a <see cref="TaskCanceledException"/> raised after cancellation was requested is treated as a cancellation.</summary>
[Fact]
public void ClassifyConnectFailure_TaskCanceled_WhenCancelRequested_IsCancellation()
{
@@ -34,6 +36,7 @@ public class DebugStreamTests
Assert.Equal(0, result.ExitCode);
}
/// <summary>Verifies that a genuine connection exception is classified as a connection failure with exit code 1.</summary>
[Fact]
public void ClassifyConnectFailure_RealException_IsConnectionFailure()
{
@@ -44,6 +47,7 @@ public class DebugStreamTests
Assert.Equal(1, result.ExitCode);
}
/// <summary>Verifies that a cancellation exception without a user cancel request is classified as a connection failure.</summary>
[Fact]
public void ClassifyConnectFailure_CanceledExceptionButNoCancelRequested_IsConnectionFailure()
{
@@ -56,8 +60,10 @@ public class DebugStreamTests
Assert.Equal(1, result.ExitCode);
}
// --- CLI-012: deterministic exit-code resolution ----------------------------------
// --- deterministic exit-code resolution ----------------------------------
/// <summary>Verifies that a result already set by stream termination is preferred when resolving the exit code.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ResolveStreamExitCodeAsync_TerminationResultSet_PrefersThatResult()
{
@@ -70,6 +76,8 @@ public class DebugStreamTests
Assert.Equal(1, code);
}
/// <summary>Verifies that the exit code resolves to zero when no termination result was ever set.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ResolveStreamExitCodeAsync_NoResult_ReturnsZero()
{
@@ -81,6 +89,8 @@ public class DebugStreamTests
Assert.Equal(0, code);
}
/// <summary>Verifies that a result arriving during the grace period is observed when resolving the exit code.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ResolveStreamExitCodeAsync_ResultArrivesDuringGrace_IsObserved()
{