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:
@@ -12,7 +12,7 @@ namespace ZB.MOM.WW.ScadaBridge.Communication.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Tests for <see cref="SiteStreamGrpcServer.PullSiteCalls"/> (Site Call Audit
|
||||
/// #22 reconciliation handler). Verifies the request →
|
||||
/// reconciliation handler). Verifies the request →
|
||||
/// <see cref="IOperationTrackingStore.ReadChangedSinceAsync"/> → response
|
||||
/// round-trip through the gRPC handler. The store is an NSubstitute stub so the
|
||||
/// tests never touch SQLite. Mirrors <see cref="SiteStreamPullAuditEventsTests"/>
|
||||
@@ -48,6 +48,8 @@ public class SiteStreamPullSiteCallsTests : TestKit
|
||||
UpdatedAtUtc: DateTime.SpecifyKind(new DateTime(2026, 5, 20, 10, 1, 0), DateTimeKind.Utc),
|
||||
TerminalAtUtc: null);
|
||||
|
||||
/// <summary>Verifies that pulling site calls with no tracking store wired returns an empty response.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullSiteCalls_NoStoreWired_ReturnsEmptyResponse()
|
||||
{
|
||||
@@ -67,6 +69,8 @@ public class SiteStreamPullSiteCallsTests : TestKit
|
||||
Assert.False(response.MoreAvailable);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that five stored rows are returned as five DTOs.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullSiteCalls_With5Rows_ReturnsAllFiveDtos()
|
||||
{
|
||||
@@ -92,6 +96,8 @@ public class SiteStreamPullSiteCallsTests : TestKit
|
||||
Assert.True(expectedIds.SetEquals(response.Operationals.Select(d => d.TrackedOperationId).ToHashSet()));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the since timestamp is passed to the store verbatim.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullSiteCalls_PassesSinceUtcThroughVerbatim()
|
||||
{
|
||||
@@ -121,10 +127,12 @@ public class SiteStreamPullSiteCallsTests : TestKit
|
||||
Assert.Equal(since, capturedSince);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a non-empty after id is passed to the store as the cursor.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullSiteCalls_AfterIdSet_PassesCursorThroughToStore()
|
||||
{
|
||||
// Task 15: a non-empty after_id is forwarded verbatim to the store as the
|
||||
// A non-empty after_id is forwarded verbatim to the store as the
|
||||
// composite-keyset cursor.
|
||||
var store = Substitute.For<IOperationTrackingStore>();
|
||||
string? capturedAfterId = "SENTINEL";
|
||||
@@ -151,6 +159,8 @@ public class SiteStreamPullSiteCallsTests : TestKit
|
||||
Assert.Equal(cursor, capturedAfterId);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an unset after id is passed to the store as null.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullSiteCalls_AfterIdUnset_PassesNullToStore()
|
||||
{
|
||||
@@ -180,6 +190,8 @@ public class SiteStreamPullSiteCallsTests : TestKit
|
||||
Assert.Null(capturedAfterId);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an unset since timestamp is passed to the store as <see cref="DateTime.MinValue"/>.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullSiteCalls_SinceUtcUnset_PassesDateTimeMinValue()
|
||||
{
|
||||
@@ -212,6 +224,8 @@ public class SiteStreamPullSiteCallsTests : TestKit
|
||||
Assert.Equal(DateTime.MinValue, captured);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a batch size of three with more rows available returns three rows and flags that more are available.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullSiteCalls_BatchSize3_Returns3Rows_MoreAvailableTrue()
|
||||
{
|
||||
@@ -236,6 +250,8 @@ public class SiteStreamPullSiteCallsTests : TestKit
|
||||
Assert.True(response.MoreAvailable);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a non-positive batch size throws an invalid-argument error.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullSiteCalls_NonPositiveBatchSize_ThrowsInvalidArgument()
|
||||
{
|
||||
@@ -254,6 +270,8 @@ public class SiteStreamPullSiteCallsTests : TestKit
|
||||
Assert.Equal(StatusCode.InvalidArgument, ex.StatusCode);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a store read failure returns an empty response.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PullSiteCalls_ReadThrows_ReturnsEmptyResponse()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user