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:
Joseph Doherty
2026-10-07 15:05:49 -04:00
parent 0ffd4bdbea
commit 513fa1aa16
998 changed files with 17896 additions and 2395 deletions
@@ -18,7 +18,7 @@ using ZB.MOM.WW.ScadaBridge.TestSupport;
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Actors;
/// <summary>
/// Task 16: InstanceActor spawns NativeAlarmActor children from the flattened
/// InstanceActor spawns NativeAlarmActor children from the flattened
/// configuration and surfaces enriched native alarm state in the DebugView snapshot.
/// </summary>
public class InstanceActorNativeAlarmTests : TestKit, IDisposable
@@ -29,6 +29,7 @@ public class InstanceActorNativeAlarmTests : TestKit, IDisposable
private readonly SiteRuntimeOptions _options = new();
private readonly TestLocalDb _localDb;
/// <summary>Initializes the test class and its test doubles.</summary>
public InstanceActorNativeAlarmTests()
{
_localDb = TestLocalDb.CreateTemp("instance-native");
@@ -64,6 +65,7 @@ public class InstanceActorNativeAlarmTests : TestKit, IDisposable
]
};
/// <summary>Verifies that the instance actor spawns a native alarm actor that subscribes through the DCL.</summary>
[Fact]
public void SpawnsNativeAlarmActor_WhichSubscribesViaDcl()
{
@@ -76,6 +78,7 @@ public class InstanceActorNativeAlarmTests : TestKit, IDisposable
Assert.Equal("ns=2;s=T01", req.SourceReference);
}
/// <summary>Verifies that the debug view snapshot includes the native alarm after a transition.</summary>
[Fact]
public void DebugViewSnapshot_IncludesNativeAlarm_AfterTransition()
{
@@ -97,6 +100,7 @@ public class InstanceActorNativeAlarmTests : TestKit, IDisposable
a.SourceReference == "T01.Hi" && a.Kind == AlarmKind.NativeOpcUa && a.Condition.Severity == 800);
}
/// <summary>Verifies that a quiet native binding emits a placeholder in the snapshot.</summary>
[Fact]
public void Snapshot_QuietNativeBinding_EmitsPlaceholder()
{
@@ -119,6 +123,7 @@ public class InstanceActorNativeAlarmTests : TestKit, IDisposable
Assert.Equal(AlarmKind.NativeOpcUa, placeholder.Kind);
}
/// <summary>Verifies that a native binding with a live condition emits no placeholder.</summary>
[Fact]
public void Snapshot_NativeBindingWithLiveCondition_NoPlaceholder()
{
@@ -127,7 +132,7 @@ public class InstanceActorNativeAlarmTests : TestKit, IDisposable
dcl.ExpectMsg<SubscribeAlarmsRequest>();
// The NativeAlarmActor emits a live condition stamped with the binding's
// canonical name (DV-1: NativeSourceCanonicalName), so the binding is "active".
// canonical name (NativeSourceCanonicalName), so the binding is "active".
actor.Tell(new AlarmStateChanged("inst", "Pressure.Hi", AlarmState.Active, 800, DateTimeOffset.UtcNow)
{
Kind = AlarmKind.NativeOpcUa,
@@ -151,6 +156,7 @@ public class InstanceActorNativeAlarmTests : TestKit, IDisposable
// ── MES alarm-status API §5.2: the script-facing alarm snapshot ────────
/// <summary>Verifies that GetAlarmSnapshot returns the same rows as the debug view snapshot.</summary>
[Fact]
public void GetAlarmSnapshot_ReturnsTheSameRowsAsTheDebugViewSnapshot()
{
@@ -190,6 +196,7 @@ public class InstanceActorNativeAlarmTests : TestKit, IDisposable
reply.Alarms.Select(a => a.AlarmName).OrderBy(n => n));
}
/// <summary>Verifies that GetAlarmSnapshot with no alarms replies with only the configured placeholders.</summary>
[Fact]
public void GetAlarmSnapshot_WithNoAlarms_RepliesWithTheConfiguredPlaceholdersOnly()
{
@@ -206,6 +213,7 @@ public class InstanceActorNativeAlarmTests : TestKit, IDisposable
Assert.Null(placeholder.AckTime);
}
/// <inheritdoc />
void IDisposable.Dispose()
{
// TestKit teardown first, so no in-flight actor can reach a disposed ILocalDb;