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
@@ -16,7 +16,7 @@ using ZB.MOM.WW.ScadaBridge.HealthMonitoring;
namespace ZB.MOM.WW.ScadaBridge.Communication.Tests;
/// <summary>
/// Arch-review phase-2 residual #3: <see cref="CentralChannelProvider"/>'s failback probe reuses
/// <see cref="CentralChannelProvider"/>'s failback probe reuses
/// the <c>Heartbeat</c> RPC to ask "does the preferred central endpoint answer again?". It is
/// emitted by a site's TRANSPORT layer, not by any node's heartbeat timer, so central must not
/// count it as liveness — otherwise a site whose real heartbeats had stopped keeps looking alive
@@ -33,6 +33,7 @@ public class SyntheticHeartbeatTests : TestKit
// ── The consumer: central skips liveness bookkeeping for a synthetic heartbeat ───
/// <summary>Verifies that a synthetic heartbeat does not mark the health aggregator.</summary>
[Fact]
public void SyntheticHeartbeat_DoesNotMarkTheHealthAggregator()
{
@@ -46,6 +47,7 @@ public class SyntheticHeartbeatTests : TestKit
aggregator.DidNotReceiveWithAnyArgs().MarkHeartbeat(default!, default);
}
/// <summary>Verifies that a real heartbeat still marks the health aggregator.</summary>
[Fact]
public void RealHeartbeat_StillMarksTheHealthAggregator()
{
@@ -58,6 +60,7 @@ public class SyntheticHeartbeatTests : TestKit
AwaitAssert(() => aggregator.Received(1).MarkHeartbeat("site-1", T0));
}
/// <summary>Verifies that a replicated synthetic heartbeat is also skipped.</summary>
[Fact]
public void SyntheticHeartbeatReplica_IsAlsoSkipped()
{
@@ -75,6 +78,8 @@ public class SyntheticHeartbeatTests : TestKit
// ── The wire contract: the flag survives the round trip ─────────────────────────
/// <summary>Verifies that the synthetic flag round-trips through the heartbeat DTO.</summary>
/// <param name="synthetic">The synthetic flag value under test.</param>
[Theory]
[InlineData(true)]
[InlineData(false)]
@@ -89,6 +94,7 @@ public class SyntheticHeartbeatTests : TestKit
Assert.Equal(msg with { Synthetic = synthetic }, back);
}
/// <summary>Verifies that a DTO from an older site defaults to not synthetic.</summary>
[Fact]
public void ADtoFromAnOlderSite_DefaultsToNotSynthetic()
{
@@ -106,6 +112,8 @@ public class SyntheticHeartbeatTests : TestKit
// ── The producer: the failback probe marks itself synthetic ─────────────────────
/// <summary>Verifies that the failback probe marks its heartbeat as synthetic.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task TheFailbackProbe_MarksItsHeartbeatSynthetic()
{
@@ -155,7 +163,9 @@ public class SyntheticHeartbeatTests : TestKit
private sealed class FixedPskProvider(string key) : ISitePskProvider
{
/// <inheritdoc />
public ValueTask<string> GetAsync(string siteId, CancellationToken ct) => new(key);
/// <inheritdoc />
public void Invalidate(string siteId) { }
}
@@ -169,6 +179,9 @@ public class SyntheticHeartbeatTests : TestKit
private readonly TaskCompletionSource<HeartbeatDto> _captured =
new(TaskCreationOptions.RunContinuationsAsynchronously);
/// <summary>Waits for the captured heartbeat request.</summary>
/// <param name="timeout">The maximum time to wait.</param>
/// <returns>The decoded heartbeat DTO.</returns>
public async Task<HeartbeatDto> WaitForHeartbeatAsync(TimeSpan timeout)
{
var completed = await Task.WhenAny(_captured.Task, Task.Delay(timeout));
@@ -176,6 +189,7 @@ public class SyntheticHeartbeatTests : TestKit
return await _captured.Task;
}
/// <inheritdoc />
protected override async Task<HttpResponseMessage> SendAsync(
HttpRequestMessage request, CancellationToken cancellationToken)
{