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:
+13
-2
@@ -8,7 +8,7 @@ using ZB.MOM.WW.ScadaBridge.SiteRuntime.Scripts;
|
||||
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Scripts;
|
||||
|
||||
/// <summary>
|
||||
/// Gitea #36 / design 2026-09-10 §5: the reset-aware handshake runs its legs in a FIXED
|
||||
/// Design 2026-09-10 §5: the reset-aware handshake runs its legs in a FIXED
|
||||
/// order — reset write, reset-echo wait, batch + trigger, response wait — and never writes
|
||||
/// the batch unless the reset echo was observed. The probe stands in for the InstanceActor
|
||||
/// so the order and the "nothing after a failed reset" property are directly observable.
|
||||
@@ -30,6 +30,8 @@ public class WriteBatchResetAndWaitTests : TestKit
|
||||
currentCallDepth: 0, maxCallDepth: 10, askTimeout: TimeSpan.FromSeconds(30),
|
||||
instanceName: Instance, logger: NullLogger.Instance);
|
||||
|
||||
/// <summary>Verifies that the legs run in order and the result reports the response phase.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Legs_RunInOrder_AndReportTheResponsePhase()
|
||||
{
|
||||
@@ -78,6 +80,8 @@ public class WriteBatchResetAndWaitTests : TestKit
|
||||
Assert.Null(result.ErrorMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a reset echo timeout reports the reset phase and never writes the batch.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ResetEchoTimeout_ReportsResetPhase_AndNeverWritesTheBatch()
|
||||
{
|
||||
@@ -100,10 +104,12 @@ public class WriteBatchResetAndWaitTests : TestKit
|
||||
Assert.True(result.ResetFailed);
|
||||
Assert.Contains("MoveOutCompleteFlag", result.ErrorMessage);
|
||||
|
||||
// The property that fixes #36: no batch, no trigger, after a reset that was never echoed.
|
||||
// The property under test: no batch, no trigger, after a reset that was never echoed.
|
||||
probe.ExpectNoMsg(TimeSpan.FromMilliseconds(500));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a response timeout reports the response phase.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ResponseTimeout_ReportsResponsePhase()
|
||||
{
|
||||
@@ -137,6 +143,7 @@ public class WriteBatchResetAndWaitTests : TestKit
|
||||
/// A reset wait that fails WITHOUT timing out (a predicate blew up in the waiter) surfaces the
|
||||
/// actor's own message verbatim rather than a synthesized one, and still writes nothing further.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ResetWaitError_PassesTheActorsMessageThrough()
|
||||
{
|
||||
@@ -166,6 +173,7 @@ public class WriteBatchResetAndWaitTests : TestKit
|
||||
/// The batch leg keeps throwing after a successful reset — a device-rejected batch is a hard
|
||||
/// failure, not a <see cref="HandshakeResult"/> the script could mistake for a timeout.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task BatchFailureAfterASuccessfulReset_StillThrows()
|
||||
{
|
||||
@@ -188,6 +196,8 @@ public class WriteBatchResetAndWaitTests : TestKit
|
||||
Assert.Contains("Batch write failed", ex.Message);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a reset write failure throws, just like a failure of the batch leg.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ResetWriteFailure_Throws_LikeTheBatchLeg()
|
||||
{
|
||||
@@ -207,6 +217,7 @@ public class WriteBatchResetAndWaitTests : TestKit
|
||||
}
|
||||
|
||||
/// <summary>The bool overload is untouched: batch first, then the wait, no reset leg.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task LegacyOverload_StillWritesTheBatchFirst()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user