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:
@@ -14,7 +14,7 @@ namespace ZB.MOM.WW.ScadaBridge.Communication.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Tests for <see cref="SiteStreamGrpcServer.PullAuditEvents"/>: the request →
|
||||
/// <c>ISiteAuditQueue.ReadPendingSinceAsync</c> → response round-trip, plus the WP2.3
|
||||
/// <c>ISiteAuditQueue.ReadPendingSinceAsync</c> → response round-trip, plus the
|
||||
/// at-least-once contract — rows are retired by the NEXT pull's cursor
|
||||
/// (<c>MarkReconciledUpToAsync</c>), never by the act of serving them. The queue is an
|
||||
/// NSubstitute stub so the tests never touch SQLite.
|
||||
@@ -33,7 +33,7 @@ public class SiteStreamPullAuditEventsTests : TestKit
|
||||
return context;
|
||||
}
|
||||
|
||||
// C3 (Task 2.5): canonical ZB.MOM.WW.Audit.AuditEvent via the shared factory.
|
||||
// Canonical ZB.MOM.WW.Audit.AuditEvent via the shared factory.
|
||||
// ForwardState is no longer a record field — it is a site-storage-only concern.
|
||||
private static AuditEvent NewEvent(DateTime? occurredAt = null) =>
|
||||
ScadaBridgeAuditEventFactory.Create(
|
||||
@@ -44,6 +44,8 @@ public class SiteStreamPullAuditEventsTests : TestKit
|
||||
?? DateTime.SpecifyKind(new DateTime(2026, 5, 20, 10, 0, 0), DateTimeKind.Utc),
|
||||
sourceSiteId: "site-1");
|
||||
|
||||
/// <summary>Verifies that large audit rows are paged by wire bytes and cursor makes progress.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task LargeAuditRows_ArePagedByWireBytes_AndCursorMakesProgress()
|
||||
{
|
||||
@@ -72,6 +74,8 @@ public class SiteStreamPullAuditEventsTests : TestKit
|
||||
Assert.Equal(256, seen.Count);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that pull audit events no queue wired returns empty response.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullAuditEvents_NoQueueWired_ReturnsEmptyResponse()
|
||||
{
|
||||
@@ -91,6 +95,8 @@ public class SiteStreamPullAuditEventsTests : TestKit
|
||||
Assert.False(response.MoreAvailable);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that pull audit events with 5 pending rows returns all five dtos and does not flip them.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullAuditEvents_With5PendingRows_ReturnsAllFiveDtos_AndDoesNotFlipThem()
|
||||
{
|
||||
@@ -122,6 +128,8 @@ public class SiteStreamPullAuditEventsTests : TestKit
|
||||
Arg.Any<IReadOnlyList<Guid>>(), Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that pull audit events fault between response and next pull reserves the same rows.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullAuditEvents_FaultBetweenResponseAndNextPull_ReservesTheSameRows()
|
||||
{
|
||||
@@ -161,6 +169,8 @@ public class SiteStreamPullAuditEventsTests : TestKit
|
||||
since, null, Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that pull audit events advanced cursor retires everything up to it before reading.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullAuditEvents_AdvancedCursor_RetiresEverythingUpToIt_BeforeReading()
|
||||
{
|
||||
@@ -193,6 +203,8 @@ public class SiteStreamPullAuditEventsTests : TestKit
|
||||
cursorTime, 100, cursorId, Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that pull audit events first ever pull does not flip anything.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullAuditEvents_FirstEverPull_DoesNotFlipAnything()
|
||||
{
|
||||
@@ -212,6 +224,8 @@ public class SiteStreamPullAuditEventsTests : TestKit
|
||||
Arg.Any<DateTime>(), Arg.Any<string?>(), Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that pull audit events rows older than since utc excluded.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullAuditEvents_RowsOlderThanSinceUtc_Excluded()
|
||||
{
|
||||
@@ -246,6 +260,8 @@ public class SiteStreamPullAuditEventsTests : TestKit
|
||||
Assert.Equal(since, capturedSince);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that pull audit events batch size 3 returns 3 rows more available true.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullAuditEvents_BatchSize3_Returns3Rows_MoreAvailableTrue()
|
||||
{
|
||||
@@ -271,6 +287,8 @@ public class SiteStreamPullAuditEventsTests : TestKit
|
||||
Assert.True(response.MoreAvailable);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that pull audit events retires before it serves so this batch is never self retired.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullAuditEvents_RetiresBeforeItServes_SoThisBatchIsNeverSelfRetired()
|
||||
{
|
||||
@@ -310,6 +328,8 @@ public class SiteStreamPullAuditEventsTests : TestKit
|
||||
Arg.Any<IReadOnlyList<Guid>>(), Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that pull audit events mark reconciled up to throws response still returned.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullAuditEvents_MarkReconciledUpToThrows_ResponseStillReturned()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user