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.ScadaBridge.Commons.Messages.RemoteQuery;
namespace ZB.MOM.WW.ScadaBridge.SiteEventLogging.Tests;
/// <summary>
/// Regression tests for SiteEventLogging-010: previously untested behaviours —
/// Regression tests for Previously untested behaviours —
/// the query service error path and the recorder's disposed-state semantics.
/// </summary>
public class EventLogCoverageTests : IDisposable
@@ -13,12 +13,14 @@ public class EventLogCoverageTests : IDisposable
private readonly string _dbPath;
private readonly TestLocalDb _localDb;
/// <summary>Initializes a new instance of the <c>EventLogCoverageTests</c> class.</summary>
public EventLogCoverageTests()
{
_dbPath = Path.Combine(Path.GetTempPath(), $"test_coverage_{Guid.NewGuid()}.db");
_localDb = TestLocalDb.Create(_dbPath);
}
/// <summary>Releases the resources held by this test class.</summary>
public void Dispose()
{
_localDb.Dispose();
@@ -46,6 +48,7 @@ public class EventLogCoverageTests : IDisposable
PageSize: 500,
Timestamp: DateTimeOffset.UtcNow);
/// <summary>Verifies that execute query returns failure response when database unavailable.</summary>
[Fact]
public void ExecuteQuery_ReturnsFailureResponse_WhenDatabaseUnavailable()
{
@@ -70,10 +73,12 @@ public class EventLogCoverageTests : IDisposable
Assert.Equal("corr-err", response.CorrelationId);
}
/// <summary>Verifies that log event async after dispose faults task not reports success.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task LogEventAsync_AfterDispose_FaultsTask_NotReportsSuccess()
{
// SiteEventLogging-012: when the logger has been disposed the event cannot
// When the logger has been disposed the event cannot
// be persisted. The returned Task must FAULT (not complete successfully) so
// an awaiting caller can distinguish a dropped audit event from a written
// one. Per the XML doc contract, the Task "faults if the write fails".
@@ -86,6 +91,7 @@ public class EventLogCoverageTests : IDisposable
() => task.WaitAsync(TimeSpan.FromSeconds(5)));
}
/// <summary>Verifies that dispose is idempotent.</summary>
[Fact]
public void Dispose_IsIdempotent()
{
@@ -95,10 +101,12 @@ public class EventLogCoverageTests : IDisposable
logger.Dispose();
}
/// <summary>Verifies that log event async enqueued then disposed faults task when write cannot complete.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task LogEventAsync_EnqueuedThenDisposed_FaultsTask_WhenWriteCannotComplete()
{
// SiteEventLogging-012, second path: an event enqueued onto the background
// Second path: an event enqueued onto the background
// writer just before disposal must NOT be reported as persisted if the
// writer's WithConnection returns false (logger disposed mid-drain). We
// flood the queue and dispose immediately; any event whose write did not