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:
@@ -6,7 +6,7 @@ using ZB.MOM.WW.ScadaBridge.CLI.Commands;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CLI.Tests.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// M9-T28b: <c>template alarm add/update</c> and <c>template script add/update</c>
|
||||
/// <c>template alarm add/update</c> and <c>template script add/update</c>
|
||||
/// must expose a <c>--trigger-kind</c> option (advisory|strict) that writes
|
||||
/// <c>"analysisKind":"Strict"</c> into the trigger-config JSON for expression
|
||||
/// triggers, matching the T28a backend contract exactly.
|
||||
@@ -17,6 +17,7 @@ public class TemplateTriggerKindTests
|
||||
// alarm-update / script-add / script-update ──────────────────────────────
|
||||
|
||||
// Inject strict into an Expression config that has no prior analysisKind
|
||||
/// <summary>Verifies that injecting the Strict analysis kind adds the analysis kind key to the trigger config.</summary>
|
||||
[Fact]
|
||||
public void InjectAnalysisKind_Strict_AddsKey()
|
||||
{
|
||||
@@ -29,6 +30,7 @@ public class TemplateTriggerKindTests
|
||||
}
|
||||
|
||||
// Inject advisory (null) into config that had Strict → key removed
|
||||
/// <summary>Verifies that injecting the Advisory analysis kind removes the analysis kind key from the trigger config.</summary>
|
||||
[Fact]
|
||||
public void InjectAnalysisKind_Advisory_RemovesKey()
|
||||
{
|
||||
@@ -41,6 +43,7 @@ public class TemplateTriggerKindTests
|
||||
}
|
||||
|
||||
// Inject strict into config that already had Strict → still Strict (idempotent)
|
||||
/// <summary>Verifies that injecting the Strict analysis kind twice yields the same config as injecting it once.</summary>
|
||||
[Fact]
|
||||
public void InjectAnalysisKind_Strict_Idempotent()
|
||||
{
|
||||
@@ -53,6 +56,7 @@ public class TemplateTriggerKindTests
|
||||
}
|
||||
|
||||
// Null config → returns null (no config to inject into)
|
||||
/// <summary>Verifies that injecting an analysis kind into a null config returns null.</summary>
|
||||
[Fact]
|
||||
public void InjectAnalysisKind_NullConfig_ReturnsNull()
|
||||
{
|
||||
@@ -61,6 +65,7 @@ public class TemplateTriggerKindTests
|
||||
}
|
||||
|
||||
// Case-insensitive: "STRICT" → canonical "Strict"
|
||||
/// <summary>Verifies that the Strict analysis kind is recognized regardless of letter casing.</summary>
|
||||
[Fact]
|
||||
public void InjectAnalysisKind_Strict_CaseInsensitive()
|
||||
{
|
||||
@@ -73,6 +78,7 @@ public class TemplateTriggerKindTests
|
||||
}
|
||||
|
||||
// Other keys preserved when injecting
|
||||
/// <summary>Verifies that injecting an analysis kind leaves the other trigger config keys unchanged.</summary>
|
||||
[Fact]
|
||||
public void InjectAnalysisKind_OtherKeysPreserved()
|
||||
{
|
||||
@@ -88,6 +94,7 @@ public class TemplateTriggerKindTests
|
||||
|
||||
// ── Option surface: alarm add + update have --trigger-kind ───────────────
|
||||
|
||||
/// <summary>Verifies that the alarm add command exposes a trigger-kind option.</summary>
|
||||
[Fact]
|
||||
public void AlarmAdd_HasTriggerKindOption()
|
||||
{
|
||||
@@ -95,6 +102,7 @@ public class TemplateTriggerKindTests
|
||||
Assert.Contains("--trigger-kind", add.Options.Select(o => o.Name));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the alarm update command exposes a trigger-kind option.</summary>
|
||||
[Fact]
|
||||
public void AlarmUpdate_HasTriggerKindOption()
|
||||
{
|
||||
@@ -104,6 +112,7 @@ public class TemplateTriggerKindTests
|
||||
|
||||
// ── Option surface: script add + update have --trigger-kind ─────────────
|
||||
|
||||
/// <summary>Verifies that the script add command exposes a trigger-kind option.</summary>
|
||||
[Fact]
|
||||
public void ScriptAdd_HasTriggerKindOption()
|
||||
{
|
||||
@@ -111,6 +120,7 @@ public class TemplateTriggerKindTests
|
||||
Assert.Contains("--trigger-kind", add.Options.Select(o => o.Name));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the script update command exposes a trigger-kind option.</summary>
|
||||
[Fact]
|
||||
public void ScriptUpdate_HasTriggerKindOption()
|
||||
{
|
||||
@@ -120,6 +130,7 @@ public class TemplateTriggerKindTests
|
||||
|
||||
// ── AlarmTriggerConfigJson.Build — analysisKind injection ────────────────
|
||||
|
||||
/// <summary>Verifies that building an expression alarm config with the Strict kind injects an analysis kind of Strict.</summary>
|
||||
[Fact]
|
||||
public void AlarmConfigBuild_Expression_StrictKind_InjectsAnalysisKindStrict()
|
||||
{
|
||||
@@ -139,6 +150,7 @@ public class TemplateTriggerKindTests
|
||||
Assert.Equal("Strict", doc.RootElement.GetProperty("analysisKind").GetString());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that building an expression alarm config with the Advisory kind omits the analysis kind key.</summary>
|
||||
[Fact]
|
||||
public void AlarmConfigBuild_Expression_AdvisoryKind_OmitsAnalysisKindKey()
|
||||
{
|
||||
@@ -158,6 +170,7 @@ public class TemplateTriggerKindTests
|
||||
Assert.False(doc.RootElement.TryGetProperty("analysisKind", out _));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that building an expression alarm config with no kind omits the analysis kind key.</summary>
|
||||
[Fact]
|
||||
public void AlarmConfigBuild_Expression_NullKind_OmitsAnalysisKindKey()
|
||||
{
|
||||
@@ -177,6 +190,7 @@ public class TemplateTriggerKindTests
|
||||
Assert.False(doc.RootElement.TryGetProperty("analysisKind", out _));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a non-expression alarm config does not emit an analysis kind even when the Strict kind is given.</summary>
|
||||
[Fact]
|
||||
public void AlarmConfigBuild_NonExpression_StrictKind_DoesNotEmitAnalysisKind()
|
||||
{
|
||||
@@ -196,6 +210,7 @@ public class TemplateTriggerKindTests
|
||||
Assert.False(doc.RootElement.TryGetProperty("analysisKind", out _));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the Strict kind is recognized case-insensitively when building an expression alarm config.</summary>
|
||||
[Fact]
|
||||
public void AlarmConfigBuild_Expression_StrictKind_CaseInsensitive()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user