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:
@@ -3,8 +3,8 @@ using ZB.MOM.WW.ScadaBridge.SiteRuntime.Scripts;
|
||||
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Scripts;
|
||||
|
||||
/// <summary>
|
||||
/// WP3.2 (site_events volume policy — docs/plans/2026-08-15-site-events-policy-design.md,
|
||||
/// stage (b) test plan items 1–3): pure unit tests for
|
||||
/// Site-events volume policy (docs/plans/2026-08-15-site-events-policy-design.md):
|
||||
/// pure unit tests for
|
||||
/// <see cref="ScriptRunEventPolicy.ShouldEmitPerRun"/>, isolated from any actor or DI
|
||||
/// plumbing — the actor-level wiring (hot toggle, hosted-service registration) is covered by
|
||||
/// <c>ScriptRunLauncherParityTests</c>.
|
||||
@@ -19,12 +19,14 @@ public class ScriptRunEventPolicyTests
|
||||
PerRunScriptEventScripts = (perRunScriptEventScripts ?? []).ToList()
|
||||
};
|
||||
|
||||
/// <summary>Verifies that the default options emit no per-run events.</summary>
|
||||
[Fact]
|
||||
public void DefaultOptions_EmitsNothing()
|
||||
{
|
||||
Assert.False(ScriptRunEventPolicy.ShouldEmitPerRun(Options(), "Inst1", "Runner"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that turning the global switch on emits for every script.</summary>
|
||||
[Fact]
|
||||
public void GlobalSwitchOn_EmitsForEveryScript()
|
||||
{
|
||||
@@ -34,6 +36,7 @@ public class ScriptRunEventPolicyTests
|
||||
Assert.True(ScriptRunEventPolicy.ShouldEmitPerRun(options, "AnyOtherInstance", "AnyOtherScript"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an exact per-script match emits.</summary>
|
||||
[Fact]
|
||||
public void ExactPerScriptMatch_Emits()
|
||||
{
|
||||
@@ -42,6 +45,7 @@ public class ScriptRunEventPolicyTests
|
||||
Assert.True(ScriptRunEventPolicy.ShouldEmitPerRun(options, "Inst1", "Runner"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an exact per-script match does not match a different script on the same instance.</summary>
|
||||
[Fact]
|
||||
public void ExactPerScriptMatch_DoesNotMatchADifferentScriptOnTheSameInstance()
|
||||
{
|
||||
@@ -50,6 +54,7 @@ public class ScriptRunEventPolicyTests
|
||||
Assert.False(ScriptRunEventPolicy.ShouldEmitPerRun(options, "Inst1", "OtherScript"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an exact per-script match does not match the same script name on a different instance.</summary>
|
||||
[Fact]
|
||||
public void ExactPerScriptMatch_DoesNotMatchTheSameScriptNameOnADifferentInstance()
|
||||
{
|
||||
@@ -58,6 +63,7 @@ public class ScriptRunEventPolicyTests
|
||||
Assert.False(ScriptRunEventPolicy.ShouldEmitPerRun(options, "Inst2", "Runner"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an instance wildcard emits for every script on that instance only.</summary>
|
||||
[Fact]
|
||||
public void InstanceWildcard_EmitsForEveryScriptOnThatInstanceOnly()
|
||||
{
|
||||
@@ -68,6 +74,7 @@ public class ScriptRunEventPolicyTests
|
||||
Assert.False(ScriptRunEventPolicy.ShouldEmitPerRun(options, "Inst2", "Runner"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a script that does not match the opt-in list stays silent.</summary>
|
||||
[Fact]
|
||||
public void NonMatchingScript_StaysSilent()
|
||||
{
|
||||
@@ -76,6 +83,7 @@ public class ScriptRunEventPolicyTests
|
||||
Assert.False(ScriptRunEventPolicy.ShouldEmitPerRun(options, "Inst3", "Runner"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an empty opt-in list stays silent.</summary>
|
||||
[Fact]
|
||||
public void EmptyOptInList_StaysSilent()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user