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,7 +5,7 @@ using ZB.MOM.WW.LocalDb;
namespace ZB.MOM.WW.ScadaBridge.Host.Tests;
/// <summary>
/// WP1.3 — CDC capture is installed only on a node that actually replicates.
/// CDC capture is installed only on a node that actually replicates.
/// </summary>
/// <remarks>
/// <para>
@@ -27,12 +27,14 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
private readonly string _root;
private readonly List<ServiceProvider> _providers = [];
/// <summary>Initializes the test with a fresh temporary directory for the database files.</summary>
public SiteLocalDbCdcRegistrationTests()
{
_root = Path.Combine(Path.GetTempPath(), $"localdb-cdc-{Guid.NewGuid():N}");
Directory.CreateDirectory(_root);
}
/// <summary>Disposes every created provider and clears the SQLite connection pools.</summary>
public void Dispose()
{
foreach (var provider in _providers)
@@ -45,6 +47,7 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
GC.SuppressFinalize(this);
}
/// <summary>Verifies that an unreplicated node installs no capture triggers.</summary>
[Fact]
public void UnreplicatedNode_InstallsNoCaptureTriggers()
{
@@ -54,6 +57,7 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
Assert.Empty(CaptureTriggers(db));
}
/// <summary>Verifies that an unreplicated node still creates every table.</summary>
[Fact]
public void UnreplicatedNode_StillCreatesEveryTable()
{
@@ -68,6 +72,7 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
Assert.Contains(table, tables);
}
/// <summary>Verifies that an initiator node installs capture triggers.</summary>
[Fact]
public void InitiatorNode_InstallsCaptureTriggers()
{
@@ -78,6 +83,7 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
AssertCaptureTriggersCoverTheReplicatedTables(db);
}
/// <summary>Verifies that a passive node with an API key but no peer address still installs capture triggers.</summary>
[Fact]
public void PassiveNode_WithApiKeyButNoPeerAddress_StillInstallsCaptureTriggers()
{
@@ -90,6 +96,7 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
AssertCaptureTriggersCoverTheReplicatedTables(db);
}
/// <summary>Verifies that a replicated node installs no capture triggers on the central-only notification tables.</summary>
[Fact]
public void ReplicatedNode_InstallsNoCaptureTriggersOnTheCentralOnlyNotificationTables()
{
@@ -104,6 +111,7 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
Assert.DoesNotContain(triggers, t => t.StartsWith("__localdb_smtp_configurations_", StringComparison.Ordinal));
}
/// <summary>Verifies that a replicated node installs no capture triggers on the node-local mirrored secrets ledger.</summary>
[Fact]
public void ReplicatedNode_InstallsNoCaptureTriggersOnTheNodeLocalMirroredSecretsLedger()
{
@@ -119,10 +127,11 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
Assert.DoesNotContain("mirrored_secrets", db.ReplicatedTables.Keys);
}
/// <summary>Verifies that an unreplicated node drops triggers left behind by a previously replicated build.</summary>
[Fact]
public void UnreplicatedNode_DropsTriggersLeftByAPreviouslyReplicatedBuild()
{
// WP3.3, the residual WP1.3 could only document: skipping registration never removed
// The residual that skipping registration alone could not close: skipping registration never removed
// what an EARLIER build installed, so a long-lived unreplicated node upgraded in place
// kept capturing forever. LocalDb 0.2.0's DeregisterReplicated closes it, and this is
// the exact upgrade shape — the same file, booted first WITH replication configured and
@@ -137,6 +146,7 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
Assert.Empty(CaptureTriggers(unreplicated));
}
/// <summary>Verifies that an unreplicated node prunes the oplog left behind by a previously replicated build.</summary>
[Fact]
public void UnreplicatedNode_PrunesTheOplogLeftByAPreviouslyReplicatedBuild()
{
@@ -156,6 +166,7 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
Assert.Equal(1, SiteEventCount(unreplicated));
}
/// <summary>Verifies that an unreplicated node over a file that was never registered is a no-op.</summary>
[Fact]
public void UnreplicatedNode_OverAFileThatWasNeverRegistered_IsANoOp()
{
@@ -172,6 +183,7 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
Assert.Contains(table, TableNames(second));
}
/// <summary>Verifies that a replicated node baselines rows that predate registration.</summary>
[Fact]
public void ReplicatedNode_BaselinesRowsThatPredateRegistration()
{
@@ -194,6 +206,7 @@ public class SiteLocalDbCdcRegistrationTests : IDisposable
Assert.Equal(0L, RowVersionHlc(replicated, "site_events"));
}
/// <summary>Verifies that an unreplicated node still runs the legacy migrator.</summary>
[Fact]
public void UnreplicatedNode_StillRunsTheLegacyMigrator()
{