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
@@ -11,7 +11,7 @@ using ZB.MOM.WW.ScadaBridge.Commons.Types.Enums;
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Services;
/// <summary>
/// Unit tests for <see cref="AlarmSummaryService"/> (M7 T13 — Operator Alarm
/// Unit tests for <see cref="AlarmSummaryService"/> (Operator Alarm
/// Summary). The snapshot client and instance repository are substituted so the
/// fan-out + best-effort degradation + roll-up math are exercised without any
/// cluster traffic.
@@ -56,6 +56,8 @@ public class AlarmSummaryServiceTests
private static DebugViewSnapshot Snapshot(string instance, params AlarmStateChanged[] alarms) =>
new(instance, Array.Empty<AttributeValueChanged>(), alarms, Now);
/// <summary>Verifies that site alarms are aggregated from reporting instances and the failed instance is recorded.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetSiteAlarmsAsync_AggregatesReportingInstances_AndRecordsTheFailedOne()
{
@@ -104,6 +106,8 @@ public class AlarmSummaryServiceTests
.GetSnapshotAsync(SiteIdentifier, "inst-e", Arg.Any<CancellationToken>());
}
/// <summary>Verifies that an instance-not-found snapshot goes to the not-reporting list.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task GetSiteAlarmsAsync_InstanceNotFoundSnapshot_GoesToNotReporting()
{
@@ -122,6 +126,7 @@ public class AlarmSummaryServiceTests
Assert.Equal(new[] { "ghost" }, result.NotReportingInstances);
}
/// <summary>Verifies that the rollup computes the worst severity, the active and unacknowledged counts and the kind counts.</summary>
[Fact]
public void ComputeRollup_ComputesWorstSeverityActiveAndUnackedAndKindCounts()
{
@@ -153,6 +158,7 @@ public class AlarmSummaryServiceTests
Assert.Equal(2, rollup.CountsByKind[AlarmKind.Computed]);
}
/// <summary>Verifies that a rollup with no active rows has a worst severity of zero.</summary>
[Fact]
public void ComputeRollup_NoActiveRows_WorstSeverityZero()
{
@@ -168,8 +174,9 @@ public class AlarmSummaryServiceTests
Assert.Equal(0, rollup.UnackedCount);
}
// ── BuildFromLiveAlarms (plan #10, Task 5) ────────────────────────────────
// ── BuildFromLiveAlarms ────────────────────────────────
/// <summary>Verifies that building from live alarms flattens and sorts the same way as the poll path, with an empty not-reporting list.</summary>
[Fact]
public void BuildFromLiveAlarms_FlattensAndSorts_SameAsPollPath_WithEmptyNotReporting()
{
@@ -195,6 +202,7 @@ public class AlarmSummaryServiceTests
Assert.Empty(result.NotReportingInstances);
}
/// <summary>Verifies that building from an empty live snapshot yields no rows.</summary>
[Fact]
public void BuildFromLiveAlarms_EmptySnapshot_YieldsNoRows()
{