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:
@@ -5,7 +5,7 @@ using ZB.MOM.WW.ScadaBridge.DataConnectionLayer;
|
||||
namespace ZB.MOM.WW.ScadaBridge.DataConnectionLayer.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// M2.4 (#8): the alarm conditionFilter is a comma-separated, case-insensitive
|
||||
/// The alarm conditionFilter is a comma-separated, case-insensitive
|
||||
/// list of condition type names. Blank = allow all. These tests pin the
|
||||
/// parse-once / IsAllowed predicate that the DataConnectionActor uses as the
|
||||
/// authoritative client-side gate.
|
||||
@@ -18,6 +18,8 @@ public class AlarmConditionFilterTests
|
||||
new AlarmConditionState(true, false, null, AlarmShelveState.Unshelved, false, 500),
|
||||
"cat", "desc", "msg", "", "", null, DateTimeOffset.UtcNow, "1", "0");
|
||||
|
||||
/// <summary>Verifies that a null or blank filter is empty and allows every condition type.</summary>
|
||||
/// <param name="filter">The condition filter text under test.</param>
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
@@ -32,6 +34,7 @@ public class AlarmConditionFilterTests
|
||||
Assert.True(f.IsAllowed(Tx("anything-at-all")));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that parsing splits a comma-separated list into individual names.</summary>
|
||||
[Fact]
|
||||
public void Parse_SplitsCommaSeparatedList()
|
||||
{
|
||||
@@ -43,6 +46,7 @@ public class AlarmConditionFilterTests
|
||||
Assert.False(f.IsAllowed(Tx("AnalogLimit.HiHi")));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the allowed check ignores letter casing.</summary>
|
||||
[Fact]
|
||||
public void IsAllowed_IsCaseInsensitive()
|
||||
{
|
||||
@@ -52,6 +56,7 @@ public class AlarmConditionFilterTests
|
||||
Assert.False(f.IsAllowed(Tx("DiscreteAlarm")));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that parsing trims whitespace around each name.</summary>
|
||||
[Fact]
|
||||
public void Parse_TrimsWhitespaceAroundEachName()
|
||||
{
|
||||
@@ -60,6 +65,7 @@ public class AlarmConditionFilterTests
|
||||
Assert.True(f.IsAllowed(Tx("DiscreteAlarm")));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that parsing drops empty entries and keeps the non-empty ones.</summary>
|
||||
[Fact]
|
||||
public void Parse_DropsEmptyEntries_KeepsNonEmpty()
|
||||
{
|
||||
@@ -70,6 +76,7 @@ public class AlarmConditionFilterTests
|
||||
Assert.False(f.IsAllowed(Tx("")));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the snapshot-complete framing sentinel is never filtered out.</summary>
|
||||
[Fact]
|
||||
public void IsAllowed_NeverDropsSnapshotCompleteFramingSentinel()
|
||||
{
|
||||
@@ -80,6 +87,7 @@ public class AlarmConditionFilterTests
|
||||
Assert.True(f.IsAllowed(Tx("", AlarmTransitionKind.SnapshotComplete)));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that replayed snapshot conditions are filtered by condition type.</summary>
|
||||
[Fact]
|
||||
public void IsAllowed_FiltersReplayedSnapshotConditionsByType()
|
||||
{
|
||||
@@ -89,6 +97,7 @@ public class AlarmConditionFilterTests
|
||||
Assert.False(f.IsAllowed(Tx("DiscreteAlarm", AlarmTransitionKind.Snapshot)));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the names property exposes the normalized set for server-side optimization.</summary>
|
||||
[Fact]
|
||||
public void Names_ExposesNormalizedSet_ForServerSideOptimization()
|
||||
{
|
||||
@@ -97,10 +106,11 @@ public class AlarmConditionFilterTests
|
||||
Assert.Empty(AlarmConditionFilter.Parse(null).Names);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an OPC UA event whose type name resolves to a friendly name matches a filter on that friendly name.</summary>
|
||||
[Fact]
|
||||
public void IsAllowed_OpcUaResolvedFriendlyName_MatchesFriendlyNameFilter()
|
||||
{
|
||||
// M2.4 (#8) regression: OPC UA delivers events whose AlarmTypeName, after
|
||||
// Regression: OPC UA delivers events whose AlarmTypeName, after
|
||||
// RealOpcUaClient.ResolveAlarmTypeName, is a standard friendly type name
|
||||
// (e.g. "ExclusiveLevelAlarmType"). A friendly-name filter on that source
|
||||
// built a correct server WhereClause; the client gate must agree and deliver,
|
||||
|
||||
Reference in New Issue
Block a user