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
@@ -9,7 +9,7 @@ using ZB.MOM.WW.ScadaBridge.Commons.Types.Enums;
namespace ZB.MOM.WW.ScadaBridge.AuditLog.Tests.Site;
/// <summary>
/// Bundle E (M6-T6) tests for <see cref="SqliteAuditWriter.GetBacklogStatsAsync"/>.
/// Tests for <see cref="SqliteAuditWriter.GetBacklogStatsAsync"/>.
/// Exercises the health-metric surface that <c>SiteAuditBacklogReporter</c>
/// polls every 30 s and pushes onto the site health report as
/// <c>SiteAuditBacklog</c>.
@@ -18,6 +18,7 @@ public class SqliteAuditWriterBacklogStatsTests : IDisposable
{
private readonly string _dbPath;
/// <summary>Creates a unique temporary database path for each test.</summary>
public SqliteAuditWriterBacklogStatsTests()
{
// OnDiskBytes assertions only make sense against a real file — the
@@ -28,6 +29,7 @@ public class SqliteAuditWriterBacklogStatsTests : IDisposable
$"audit-backlog-stats-{Guid.NewGuid():N}.db");
}
/// <summary>Releases the resources held by this test class.</summary>
public void Dispose()
{
if (File.Exists(_dbPath))
@@ -52,6 +54,8 @@ public class SqliteAuditWriterBacklogStatsTests : IDisposable
kind: AuditKind.ApiCall,
status: AuditStatus.Delivered);
/// <summary>Verifies that an empty database reports zero pending events, no oldest-pending timestamp and zero bytes on disk.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task EmptyDb_Returns_Zero_Null_AndZeroBytes()
{
@@ -70,6 +74,8 @@ public class SqliteAuditWriterBacklogStatsTests : IDisposable
$"OnDiskBytes must be non-negative, got {snapshot.OnDiskBytes}");
}
/// <summary>Verifies that five pending events are reported as a pending count of five.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Pending_5_Returns_5()
{
@@ -85,6 +91,8 @@ public class SqliteAuditWriterBacklogStatsTests : IDisposable
Assert.Equal(5, snapshot.PendingCount);
}
/// <summary>Verifies that the oldest-pending timestamp is the earliest <c>OccurredAtUtc</c> among the pending events.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task OldestPending_Is_Earliest_OccurredAtUtc()
{
@@ -110,10 +118,12 @@ public class SqliteAuditWriterBacklogStatsTests : IDisposable
Assert.Equal(t1, snapshot.OldestPendingUtc!.Value);
}
/// <summary>Verifies that reading the backlog stats does not block while a concurrent write load is running.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetBacklogStatsAsync_DoesNotBlockOnConcurrentWriteLoad()
{
// AuditLog-005: GetBacklogStatsAsync previously took _writeLock, the
// GetBacklogStatsAsync previously took _writeLock, the
// same lock that serialises every batch INSERT in FlushBatch. Under a
// backlog growing to hundreds of thousands of rows a COUNT(*)+MIN
// index scan could park the hot-path writer for hundreds of ms. The
@@ -163,6 +173,8 @@ public class SqliteAuditWriterBacklogStatsTests : IDisposable
$"backlog probe should see at least the seeded rows; got {snapshot.PendingCount}");
}
/// <summary>Verifies that the on-disk byte count matches the size of the database file.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task OnDiskBytes_ReturnsFileSize()
{