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:
+11
-2
@@ -15,7 +15,7 @@ using System.Text.Json;
|
||||
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Actors;
|
||||
|
||||
/// <summary>
|
||||
/// Integration tests for InstanceActor with child Script/Alarm actors (WP-15, WP-16, WP-24, WP-25).
|
||||
/// Integration tests for InstanceActor with child Script/Alarm actors.
|
||||
/// </summary>
|
||||
public class InstanceActorIntegrationTests : TestKit, IDisposable
|
||||
{
|
||||
@@ -25,6 +25,7 @@ public class InstanceActorIntegrationTests : TestKit, IDisposable
|
||||
private readonly SiteRuntimeOptions _options;
|
||||
private readonly TestLocalDb _localDb;
|
||||
|
||||
/// <summary>Creates the temporary local database, storage service, script services and runtime options the tests share.</summary>
|
||||
public InstanceActorIntegrationTests()
|
||||
{
|
||||
_localDb = TestLocalDb.CreateTemp("instance-int-test");
|
||||
@@ -44,6 +45,7 @@ public class InstanceActorIntegrationTests : TestKit, IDisposable
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
// TestKit teardown first, so no in-flight actor can reach a disposed ILocalDb;
|
||||
@@ -82,6 +84,7 @@ public class InstanceActorIntegrationTests : TestKit, IDisposable
|
||||
NullLogger<InstanceActor>.Instance)));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the instance actor creates script actors from its configuration.</summary>
|
||||
[Fact]
|
||||
public void InstanceActor_CreatesScriptActors_FromConfig()
|
||||
{
|
||||
@@ -103,6 +106,7 @@ public class InstanceActorIntegrationTests : TestKit, IDisposable
|
||||
Assert.Equal(42, result.ReturnValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that calling an unknown script returns an error.</summary>
|
||||
[Fact]
|
||||
public void InstanceActor_ScriptCallRequest_UnknownScript_ReturnsError()
|
||||
{
|
||||
@@ -114,10 +118,11 @@ public class InstanceActorIntegrationTests : TestKit, IDisposable
|
||||
Assert.Contains("not found", result.ErrorMessage);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that rapid attribute changes are serialized through the actor mailbox without corrupting state.</summary>
|
||||
[Fact]
|
||||
public void InstanceActor_WP24_StateMutationsSerializedThroughMailbox()
|
||||
{
|
||||
// WP-24: Instance Actor processes messages sequentially.
|
||||
// Instance Actor processes messages sequentially.
|
||||
// Verify that rapid attribute changes don't corrupt state.
|
||||
var actor = CreateInstanceWithScripts("Pump1");
|
||||
|
||||
@@ -143,6 +148,7 @@ public class InstanceActorIntegrationTests : TestKit, IDisposable
|
||||
Assert.Equal("49", response.Value?.ToString());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that subscribing to the debug view returns a snapshot.</summary>
|
||||
[Fact]
|
||||
public void InstanceActor_WP25_DebugViewSubscribe_ReturnsSnapshot()
|
||||
{
|
||||
@@ -159,6 +165,7 @@ public class InstanceActorIntegrationTests : TestKit, IDisposable
|
||||
Assert.True(snapshot.SnapshotTimestamp > DateTimeOffset.MinValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a debug view subscription no longer forwards events through the cluster client.</summary>
|
||||
[Fact]
|
||||
public void InstanceActor_WP25_DebugViewSubscribe_NoLongerForwardsEventsViaClusterClient()
|
||||
{
|
||||
@@ -179,6 +186,7 @@ public class InstanceActorIntegrationTests : TestKit, IDisposable
|
||||
ExpectNoMsg(TimeSpan.FromSeconds(1));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that unsubscribing from the debug view stops notifications.</summary>
|
||||
[Fact]
|
||||
public void InstanceActor_WP25_DebugViewUnsubscribe_StopsNotifications()
|
||||
{
|
||||
@@ -199,6 +207,7 @@ public class InstanceActorIntegrationTests : TestKit, IDisposable
|
||||
ExpectNoMsg(TimeSpan.FromSeconds(1));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the instance actor creates alarm actors from its configuration.</summary>
|
||||
[Fact]
|
||||
public void InstanceActor_CreatesAlarmActors_FromConfig()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user