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
@@ -26,6 +26,7 @@ namespace ZB.MOM.WW.ScadaBridge.Communication.Tests;
/// </summary>
public class CentralCommunicationActorTests : TestKit
{
/// <summary>Initializes a new instance of the <see cref="CentralCommunicationActorTests"/> class with debug-level Akka logging.</summary>
public CentralCommunicationActorTests() : base(@"akka.loglevel = DEBUG") { }
private (IActorRef actor, ISiteRepository mockRepo) CreateActorWithMockRepo(
@@ -44,6 +45,7 @@ public class CentralCommunicationActorTests : TestKit
return (actor, mockRepo);
}
/// <summary>Verifies that a heartbeat bumps the aggregator timestamp for the site.</summary>
[Fact]
public void Heartbeat_BumpsAggregatorTimestamp()
{
@@ -68,10 +70,11 @@ public class CentralCommunicationActorTests : TestKit
AwaitAssert(() => aggregator.Received(1).MarkHeartbeat("site1", timestamp));
}
/// <summary>Verifies that a replicated heartbeat marks the local aggregator without being rebroadcast.</summary>
[Fact]
public void HeartbeatReplica_MarksLocalAggregator_WithoutRebroadcast()
{
// Task 16 (arch review 02): a heartbeat replicated from the peer central
// A heartbeat replicated from the peer central
// node marks the local aggregator (so post-failover both nodes know the
// site's liveness) but is NOT re-published (it arrives via pub-sub already).
var mockRepo = Substitute.For<ISiteRepository>();
@@ -95,10 +98,11 @@ public class CentralCommunicationActorTests : TestKit
AwaitAssert(() => aggregator.Received(1).MarkHeartbeat("site-1", ts));
}
/// <summary>Verifies that a failure loading site addresses is logged rather than silently swallowed.</summary>
[Fact]
public void LoadSiteAddressesFailure_IsLoggedNotSilentlySwallowed()
{
// Regression test for Communication-006. When the repository query throws,
// Regression test: when the repository query throws,
// PipeTo delivers a Status.Failure to the actor. Without a Receive<Status.Failure>
// handler the failure becomes an unhandled message (debug-level only) and the
// periodic refresh fails silently — operators cannot tell "no addresses
@@ -123,6 +127,7 @@ public class CentralCommunicationActorTests : TestKit
private NotificationSubmit CreateSubmit(string id = "notif1") =>
new(id, "ops-list", "Subject", "Body", "site1", "inst1", "script.cs", DateTimeOffset.UtcNow);
/// <summary>Verifies that a notification submit is forwarded to the outbox proxy and the ack is routed back to the site.</summary>
[Fact]
public void NotificationSubmit_ForwardedToOutboxProxy_AckRoutesBackToSite()
{
@@ -142,6 +147,7 @@ public class CentralCommunicationActorTests : TestKit
siteProbe.ExpectMsg<NotificationSubmitAck>(a => a.NotificationId == "notif1" && a.Accepted);
}
/// <summary>Verifies that a notification status query is forwarded to the outbox proxy and the response is routed back to the site.</summary>
[Fact]
public void NotificationStatusQuery_ForwardedToOutboxProxy_ResponseRoutesBackToSite()
{
@@ -160,6 +166,7 @@ public class CentralCommunicationActorTests : TestKit
siteProbe.ExpectMsg<NotificationStatusResponse>(r => r.CorrelationId == "corr1" && r.Found);
}
/// <summary>Verifies that a notification submit with no outbox configured replies with a non-accepted ack.</summary>
[Fact]
public void NotificationSubmit_NoOutboxConfigured_RepliesNonAccepted()
{
@@ -175,6 +182,7 @@ public class CentralCommunicationActorTests : TestKit
Assert.NotNull(ack.Error);
}
/// <summary>Verifies that a notification status query with no outbox configured replies with a not-found response.</summary>
[Fact]
public void NotificationStatusQuery_NoOutboxConfigured_RepliesNotFound()
{