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:
@@ -8,10 +8,10 @@ using ZB.MOM.WW.ScadaBridge.Commons.Types.Enums;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Shared;
|
||||
|
||||
/// <summary>
|
||||
/// M9-T28b: the <c>AlarmTriggerEditor</c> and <c>ScriptTriggerEditor</c>
|
||||
/// The <c>AlarmTriggerEditor</c> and <c>ScriptTriggerEditor</c>
|
||||
/// components must surface an Advisory|Strict selector for Expression triggers
|
||||
/// and round-trip the <c>"analysisKind"</c> key into the trigger config JSON
|
||||
/// that the T28a ValidationService backend reads.
|
||||
/// that the ValidationService backend reads.
|
||||
/// </summary>
|
||||
|
||||
// ── AlarmTriggerConfigCodec — analysisKind parse / serialize ────────────────
|
||||
@@ -19,6 +19,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Shared;
|
||||
public class AlarmTriggerAnalysisKindCodecTests
|
||||
{
|
||||
// Codec: parse — absent key defaults to Advisory (false)
|
||||
/// <summary>Verifies that parsing an Expression trigger with no analysis kind defaults to Advisory.</summary>
|
||||
[Fact]
|
||||
public void Parse_Expression_NoAnalysisKind_DefaultsToAdvisory()
|
||||
{
|
||||
@@ -28,6 +29,7 @@ public class AlarmTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: parse — "Advisory" explicit → false
|
||||
/// <summary>Verifies that parsing an Expression trigger with the Advisory key returns false.</summary>
|
||||
[Fact]
|
||||
public void Parse_Expression_AdvisoryKey_ReturnsFalse()
|
||||
{
|
||||
@@ -37,6 +39,7 @@ public class AlarmTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: parse — "Strict" → true
|
||||
/// <summary>Verifies that parsing an Expression trigger with the Strict key returns true.</summary>
|
||||
[Fact]
|
||||
public void Parse_Expression_StrictKey_ReturnsTrue()
|
||||
{
|
||||
@@ -46,6 +49,7 @@ public class AlarmTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: parse — case-insensitive
|
||||
/// <summary>Verifies that the Strict key is parsed case-insensitively.</summary>
|
||||
[Fact]
|
||||
public void Parse_Expression_StrictKeyCaseInsensitive()
|
||||
{
|
||||
@@ -55,6 +59,7 @@ public class AlarmTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: serialize — Advisory (false) → "analysisKind" key omitted
|
||||
/// <summary>Verifies that serializing an Advisory Expression trigger omits the analysisKind key.</summary>
|
||||
[Fact]
|
||||
public void Serialize_Expression_Advisory_OmitsAnalysisKindKey()
|
||||
{
|
||||
@@ -66,6 +71,7 @@ public class AlarmTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: serialize — Strict (true) → "analysisKind":"Strict"
|
||||
/// <summary>Verifies that serializing a Strict Expression trigger writes analysisKind as Strict.</summary>
|
||||
[Fact]
|
||||
public void Serialize_Expression_Strict_WritesAnalysisKindStrict()
|
||||
{
|
||||
@@ -77,6 +83,7 @@ public class AlarmTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: serialize — Strict not emitted for non-Expression trigger types
|
||||
/// <summary>Verifies that serializing a non-Expression trigger does not emit analysisKind.</summary>
|
||||
[Fact]
|
||||
public void Serialize_NonExpression_DoesNotEmitAnalysisKind()
|
||||
{
|
||||
@@ -94,6 +101,7 @@ public class AlarmTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: round-trip Strict
|
||||
/// <summary>Verifies that a Strict Expression trigger is preserved through a round trip.</summary>
|
||||
[Fact]
|
||||
public void RoundTrip_Expression_Strict_Preserved()
|
||||
{
|
||||
@@ -106,6 +114,7 @@ public class AlarmTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: round-trip Advisory (omit + re-parse → still false)
|
||||
/// <summary>Verifies that an Advisory Expression trigger is preserved through a round trip.</summary>
|
||||
[Fact]
|
||||
public void RoundTrip_Expression_Advisory_Preserved()
|
||||
{
|
||||
@@ -122,6 +131,7 @@ public class AlarmTriggerAnalysisKindCodecTests
|
||||
public class ScriptTriggerAnalysisKindCodecTests
|
||||
{
|
||||
// Codec: parse — absent key defaults to Advisory (false)
|
||||
/// <summary>Verifies that parsing an Expression trigger with no analysis kind defaults to Advisory.</summary>
|
||||
[Fact]
|
||||
public void Parse_Expression_NoAnalysisKind_DefaultsToAdvisory()
|
||||
{
|
||||
@@ -131,6 +141,7 @@ public class ScriptTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: parse — "Strict" → true
|
||||
/// <summary>Verifies that parsing an Expression trigger with the Strict key returns true.</summary>
|
||||
[Fact]
|
||||
public void Parse_Expression_StrictKey_ReturnsTrue()
|
||||
{
|
||||
@@ -140,6 +151,7 @@ public class ScriptTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: serialize — Advisory → key omitted
|
||||
/// <summary>Verifies that serializing an Advisory Expression trigger omits the analysisKind key.</summary>
|
||||
[Fact]
|
||||
public void Serialize_Expression_Advisory_OmitsAnalysisKindKey()
|
||||
{
|
||||
@@ -151,6 +163,7 @@ public class ScriptTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: serialize — Strict → "analysisKind":"Strict"
|
||||
/// <summary>Verifies that serializing a Strict Expression trigger writes analysisKind as Strict.</summary>
|
||||
[Fact]
|
||||
public void Serialize_Expression_Strict_WritesAnalysisKindStrict()
|
||||
{
|
||||
@@ -162,6 +175,7 @@ public class ScriptTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: serialize — Strict not emitted for non-Expression triggers
|
||||
/// <summary>Verifies that serializing a non-Expression trigger does not emit analysisKind.</summary>
|
||||
[Fact]
|
||||
public void Serialize_NonExpression_DoesNotEmitAnalysisKind()
|
||||
{
|
||||
@@ -179,6 +193,7 @@ public class ScriptTriggerAnalysisKindCodecTests
|
||||
}
|
||||
|
||||
// Codec: round-trip Strict
|
||||
/// <summary>Verifies that a Strict Expression trigger is preserved through a round trip.</summary>
|
||||
[Fact]
|
||||
public void RoundTrip_Expression_Strict_Preserved()
|
||||
{
|
||||
@@ -200,6 +215,7 @@ public class ScriptTriggerAnalysisKindCodecTests
|
||||
|
||||
public class AlarmTriggerEditorAnalysisKindTests : BunitContext
|
||||
{
|
||||
/// <summary>Initializes the test context for the alarm trigger editor.</summary>
|
||||
public AlarmTriggerEditorAnalysisKindTests()
|
||||
{
|
||||
// MonacoEditor calls MonacoBlazor.createEditor via JS interop. Use Loose
|
||||
@@ -208,6 +224,7 @@ public class AlarmTriggerEditorAnalysisKindTests : BunitContext
|
||||
}
|
||||
|
||||
// Selector is visible for Expression trigger type
|
||||
/// <summary>Verifies that the alarm trigger editor shows the analysis kind selector for an Expression trigger.</summary>
|
||||
[Fact]
|
||||
public void AlarmTriggerEditor_Expression_ShowsAnalysisKindSelector()
|
||||
{
|
||||
@@ -221,6 +238,7 @@ public class AlarmTriggerEditorAnalysisKindTests : BunitContext
|
||||
}
|
||||
|
||||
// Selector is NOT visible for non-Expression trigger types
|
||||
/// <summary>Verifies that the alarm trigger editor does not show the analysis kind selector for a non-Expression trigger.</summary>
|
||||
[Fact]
|
||||
public void AlarmTriggerEditor_NonExpression_DoesNotShowAnalysisKindSelector()
|
||||
{
|
||||
@@ -232,6 +250,7 @@ public class AlarmTriggerEditorAnalysisKindTests : BunitContext
|
||||
}
|
||||
|
||||
// Selector defaults to Advisory
|
||||
/// <summary>Verifies that the alarm trigger editor selector defaults to Advisory for an Expression trigger.</summary>
|
||||
[Fact]
|
||||
public void AlarmTriggerEditor_Expression_NoAnalysisKindInConfig_SelectorDefaultsAdvisory()
|
||||
{
|
||||
@@ -245,6 +264,7 @@ public class AlarmTriggerEditorAnalysisKindTests : BunitContext
|
||||
}
|
||||
|
||||
// Selector defaults to Advisory when config has no analysisKind (ScriptTriggerEditor)
|
||||
/// <summary>Verifies that the trigger editor selector defaults to Advisory when the config has no analysis kind.</summary>
|
||||
[Fact]
|
||||
public void ScriptTriggerEditor_Expression_NoAnalysisKindInConfig_SelectorDefaultsAdvisory()
|
||||
{
|
||||
@@ -258,6 +278,7 @@ public class AlarmTriggerEditorAnalysisKindTests : BunitContext
|
||||
}
|
||||
|
||||
// Choosing Strict writes analysisKind:"Strict" into emitted config
|
||||
/// <summary>Verifies that choosing Strict in the alarm trigger editor emits analysisKind as Strict.</summary>
|
||||
[Fact]
|
||||
public void AlarmTriggerEditor_Expression_ChoosingStrict_EmitsAnalysisKindStrict()
|
||||
{
|
||||
@@ -276,6 +297,7 @@ public class AlarmTriggerEditorAnalysisKindTests : BunitContext
|
||||
}
|
||||
|
||||
// Loaded Strict config reflects in selector, emits Strict on next change
|
||||
/// <summary>Verifies that a loaded Strict config is retained when the alarm trigger is edited.</summary>
|
||||
[Fact]
|
||||
public void AlarmTriggerEditor_Expression_LoadedStrictConfig_RetainedOnEdit()
|
||||
{
|
||||
@@ -299,6 +321,7 @@ public class AlarmTriggerEditorAnalysisKindTests : BunitContext
|
||||
|
||||
public class ScriptTriggerEditorAnalysisKindTests : BunitContext
|
||||
{
|
||||
/// <summary>Initializes the test context for the script trigger editor.</summary>
|
||||
public ScriptTriggerEditorAnalysisKindTests()
|
||||
{
|
||||
// MonacoEditor calls MonacoBlazor.createEditor via JS interop. Use Loose
|
||||
@@ -307,6 +330,7 @@ public class ScriptTriggerEditorAnalysisKindTests : BunitContext
|
||||
}
|
||||
|
||||
// Selector is visible for Expression trigger type
|
||||
/// <summary>Verifies that the script trigger editor shows the analysis kind selector for an Expression trigger.</summary>
|
||||
[Fact]
|
||||
public void ScriptTriggerEditor_Expression_ShowsAnalysisKindSelector()
|
||||
{
|
||||
@@ -319,6 +343,7 @@ public class ScriptTriggerEditorAnalysisKindTests : BunitContext
|
||||
}
|
||||
|
||||
// Selector is NOT visible for non-Expression trigger types
|
||||
/// <summary>Verifies that the script trigger editor does not show the analysis kind selector for a Conditional trigger.</summary>
|
||||
[Fact]
|
||||
public void ScriptTriggerEditor_Conditional_DoesNotShowAnalysisKindSelector()
|
||||
{
|
||||
@@ -330,6 +355,7 @@ public class ScriptTriggerEditorAnalysisKindTests : BunitContext
|
||||
}
|
||||
|
||||
// Choosing Strict writes analysisKind:"Strict" into emitted config
|
||||
/// <summary>Verifies that choosing Strict in the script trigger editor emits analysisKind as Strict.</summary>
|
||||
[Fact]
|
||||
public void ScriptTriggerEditor_Expression_ChoosingStrict_EmitsAnalysisKindStrict()
|
||||
{
|
||||
@@ -348,6 +374,7 @@ public class ScriptTriggerEditorAnalysisKindTests : BunitContext
|
||||
}
|
||||
|
||||
// Choosing Advisory emits config without analysisKind key
|
||||
/// <summary>Verifies that choosing Advisory in the script trigger editor omits the analysisKind key.</summary>
|
||||
[Fact]
|
||||
public void ScriptTriggerEditor_Expression_ChoosingAdvisory_OmitsAnalysisKindKey()
|
||||
{
|
||||
@@ -366,6 +393,7 @@ public class ScriptTriggerEditorAnalysisKindTests : BunitContext
|
||||
}
|
||||
|
||||
// Loaded Strict is retained on unrelated edit (fire mode change)
|
||||
/// <summary>Verifies that a loaded Strict setting is retained when the trigger mode changes.</summary>
|
||||
[Fact]
|
||||
public void ScriptTriggerEditor_Expression_LoadedStrict_RetainedOnModeChange()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user