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
@@ -11,10 +11,11 @@ using ZB.MOM.WW.ScadaBridge.Commons.Types.Notifications;
namespace ZB.MOM.WW.ScadaBridge.Communication.Tests;
/// <summary>
/// WP-2: Tests for CommunicationService initialization and state.
/// Tests for CommunicationService initialization and state.
/// </summary>
public class CommunicationServiceTests : TestKit
{
/// <summary>Verifies that unsubscribing a debug view is sent as a fire-and-forget Tell rather than an Ask.</summary>
[Fact]
public void UnsubscribeDebugView_IsTellNotAsk()
{
@@ -24,8 +25,10 @@ public class CommunicationServiceTests : TestKit
Assert.Equal(typeof(void), method!.ReturnType);
}
// ── DeploymentManager-006: query-the-site-before-redeploy ──
// ── Query the site before redeploy ──
/// <summary>Verifies that querying deployment state before initialization throws.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task QueryDeploymentStateAsync_BeforeInitialization_Throws()
{
@@ -38,6 +41,8 @@ public class CommunicationServiceTests : TestKit
new DeploymentStateQueryRequest("corr-1", "inst1", DateTimeOffset.UtcNow)));
}
/// <summary>Verifies that querying deployment state sends a site envelope and returns the site's response.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task QueryDeploymentStateAsync_SendsEnvelopeAndReturnsResponse()
{
@@ -64,6 +69,8 @@ public class CommunicationServiceTests : TestKit
// ── Notification Outbox: central-side outbox actor calls ──
/// <summary>Verifies that querying the notification outbox before the outbox proxy is set throws.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task QueryNotificationOutboxAsync_BeforeOutboxSet_Throws()
{
@@ -77,6 +84,8 @@ public class CommunicationServiceTests : TestKit
"corr-1", null, null, null, null, false, null, null, null, 1, 50)));
}
/// <summary>Verifies that retrying a notification before the outbox proxy is set throws.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RetryNotificationAsync_BeforeOutboxSet_Throws()
{
@@ -88,6 +97,8 @@ public class CommunicationServiceTests : TestKit
service.RetryNotificationAsync(new RetryNotificationRequest("corr-1", "n1")));
}
/// <summary>Verifies that discarding a notification before the outbox proxy is set throws.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task DiscardNotificationAsync_BeforeOutboxSet_Throws()
{
@@ -99,6 +110,8 @@ public class CommunicationServiceTests : TestKit
service.DiscardNotificationAsync(new DiscardNotificationRequest("corr-1", "n1")));
}
/// <summary>Verifies that getting notification KPIs before the outbox proxy is set throws.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetNotificationKpisAsync_BeforeOutboxSet_Throws()
{
@@ -110,6 +123,8 @@ public class CommunicationServiceTests : TestKit
service.GetNotificationKpisAsync(new NotificationKpiRequest("corr-1")));
}
/// <summary>Verifies that querying the notification outbox asks the outbox proxy directly.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task QueryNotificationOutboxAsync_AsksOutboxProxyDirectly()
{
@@ -134,6 +149,8 @@ public class CommunicationServiceTests : TestKit
Assert.Same(reply, await task);
}
/// <summary>Verifies that retrying a notification asks the outbox proxy directly.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RetryNotificationAsync_AsksOutboxProxyDirectly()
{
@@ -154,6 +171,8 @@ public class CommunicationServiceTests : TestKit
Assert.Same(reply, await task);
}
/// <summary>Verifies that discarding a notification asks the outbox proxy directly.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task DiscardNotificationAsync_AsksOutboxProxyDirectly()
{
@@ -176,6 +195,8 @@ public class CommunicationServiceTests : TestKit
Assert.False(result.Success);
}
/// <summary>Verifies that getting notification KPIs asks the outbox proxy directly.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetNotificationKpisAsync_AsksOutboxProxyDirectly()
{
@@ -198,6 +219,8 @@ public class CommunicationServiceTests : TestKit
Assert.Equal(3, result.QueueDepth);
}
/// <summary>Verifies that getting per-site notification KPIs asks the outbox proxy directly.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetPerSiteNotificationKpisAsync_AsksOutboxProxyDirectly()
{
@@ -226,6 +249,8 @@ public class CommunicationServiceTests : TestKit
// ── Site Call Audit: central-side audit actor calls ──
/// <summary>Verifies that querying site calls before the site call audit proxy is set throws.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task QuerySiteCallsAsync_BeforeSiteCallAuditSet_Throws()
{
@@ -238,6 +263,8 @@ public class CommunicationServiceTests : TestKit
"corr-1", null, null, null, null, false, null, null, null, null, 50)));
}
/// <summary>Verifies that getting site call KPIs before the site call audit proxy is set throws.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetSiteCallKpisAsync_BeforeSiteCallAuditSet_Throws()
{
@@ -249,6 +276,8 @@ public class CommunicationServiceTests : TestKit
service.GetSiteCallKpisAsync(new SiteCallKpiRequest("corr-1")));
}
/// <summary>Verifies that getting site call detail before the site call audit proxy is set throws.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetSiteCallDetailAsync_BeforeSiteCallAuditSet_Throws()
{
@@ -260,6 +289,8 @@ public class CommunicationServiceTests : TestKit
service.GetSiteCallDetailAsync(new SiteCallDetailRequest("corr-1", Guid.NewGuid())));
}
/// <summary>Verifies that getting per-site site call KPIs before the site call audit proxy is set throws.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetPerSiteSiteCallKpisAsync_BeforeSiteCallAuditSet_Throws()
{
@@ -271,6 +302,8 @@ public class CommunicationServiceTests : TestKit
service.GetPerSiteSiteCallKpisAsync(new PerSiteSiteCallKpiRequest("corr-1")));
}
/// <summary>Verifies that querying site calls asks the site call audit proxy directly.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task QuerySiteCallsAsync_AsksSiteCallAuditProxyDirectly()
{
@@ -296,6 +329,8 @@ public class CommunicationServiceTests : TestKit
Assert.Same(reply, await task);
}
/// <summary>Verifies that getting site call detail asks the site call audit proxy directly.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetSiteCallDetailAsync_AsksSiteCallAuditProxyDirectly()
{
@@ -318,6 +353,8 @@ public class CommunicationServiceTests : TestKit
Assert.False(result.Success);
}
/// <summary>Verifies that getting site call KPIs asks the site call audit proxy directly.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetSiteCallKpisAsync_AsksSiteCallAuditProxyDirectly()
{
@@ -342,6 +379,8 @@ public class CommunicationServiceTests : TestKit
Assert.Equal(1, result.StuckCount);
}
/// <summary>Verifies that getting per-site site call KPIs asks the site call audit proxy directly.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetPerSiteSiteCallKpisAsync_AsksSiteCallAuditProxyDirectly()
{
@@ -368,6 +407,8 @@ public class CommunicationServiceTests : TestKit
Assert.Equal("plant-a", result.Sites[0].SourceSite);
}
/// <summary>Verifies that retrying a site call before the site call audit proxy is set throws.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RetrySiteCallAsync_BeforeSiteCallAuditSet_Throws()
{
@@ -379,6 +420,8 @@ public class CommunicationServiceTests : TestKit
service.RetrySiteCallAsync(new RetrySiteCallRequest("corr-1", Guid.NewGuid(), "plant-a")));
}
/// <summary>Verifies that retrying a site call asks the site call audit proxy directly.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RetrySiteCallAsync_AsksSiteCallAuditProxyDirectly()
{
@@ -403,6 +446,8 @@ public class CommunicationServiceTests : TestKit
Assert.Same(reply, await task);
}
/// <summary>Verifies that discarding a site call asks the site call audit proxy directly.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task DiscardSiteCallAsync_AsksSiteCallAuditProxyDirectly()
{
@@ -433,6 +478,7 @@ public class CommunicationServiceTests : TestKit
/// </summary>
private class EchoStateQueryActor : ReceiveActor
{
/// <summary>Initializes the actor and registers its handler for site envelopes carrying deployment state queries.</summary>
public EchoStateQueryActor()
{
Receive<SiteEnvelope>(env =>