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
@@ -8,7 +8,7 @@ using ZB.MOM.WW.ScadaBridge.Commons.Types;
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Components.Health;
/// <summary>
/// bUnit tests for <see cref="AuditKpiTiles"/> (#23 M7 Bundle E / M7-T13). The
/// bUnit tests for <see cref="AuditKpiTiles"/>. The
/// component renders three Bootstrap-card tiles — Volume, Error Rate, Backlog —
/// from a single <see cref="AuditLogKpiSnapshot"/>. The tests pin:
///
@@ -25,6 +25,7 @@ public class AuditKpiTilesTests : BunitContext
private static AuditLogKpiSnapshot MakeSnapshot(long total, long errors, long backlog) =>
new(total, errors, backlog, new DateTime(2026, 5, 20, 10, 0, 0, DateTimeKind.Utc));
/// <summary>Verifies that three tiles are rendered from the snapshot.</summary>
[Fact]
public void Renders_ThreeTiles_FromSnapshot()
{
@@ -43,6 +44,7 @@ public class AuditKpiTilesTests : BunitContext
Assert.Contains("7", cut.Markup); // backlog
}
/// <summary>Verifies that the error rate is computed from the total and error counts.</summary>
[Fact]
public void ErrorRate_Computed_From_Total_AndErrors()
{
@@ -54,6 +56,7 @@ public class AuditKpiTilesTests : BunitContext
Assert.Contains("5.0%", cut.Markup);
}
/// <summary>Verifies that zero events do not cause a division by zero and render a zero percent error rate.</summary>
[Fact]
public void ZeroEvents_DoesNotDivideByZero_RendersZeroPercent()
{
@@ -70,6 +73,7 @@ public class AuditKpiTilesTests : BunitContext
Assert.Contains("data-test=\"audit-kpi-volume\"", cut.Markup);
}
/// <summary>Verifies that an unavailable snapshot renders em dashes and an error message.</summary>
[Fact]
public void UnavailableSnapshot_RendersEmDashes_AndErrorMessage()
{
@@ -85,6 +89,7 @@ public class AuditKpiTilesTests : BunitContext
Assert.Contains("DB connection refused", cut.Markup);
}
/// <summary>Verifies that clicking the error rate tile navigates to the audit log filtered by failed status.</summary>
[Fact]
public void ErrorRateTile_Click_NavigatesToAuditLog_WithFailedStatusFilter()
{
@@ -102,6 +107,7 @@ public class AuditKpiTilesTests : BunitContext
Assert.Contains("/audit/log?status=Failed", nav.Uri);
}
/// <summary>Verifies that clicking the volume tile navigates to the unfiltered audit log.</summary>
[Fact]
public void VolumeTile_Click_NavigatesToUnfilteredAuditLog()
{
@@ -117,6 +123,7 @@ public class AuditKpiTilesTests : BunitContext
Assert.EndsWith("/audit/log", nav.Uri);
}
/// <summary>Verifies that clicking the backlog tile navigates to the audit log.</summary>
[Fact]
public void BacklogTile_Click_NavigatesToAuditLog()
{
@@ -131,6 +138,7 @@ public class AuditKpiTilesTests : BunitContext
Assert.EndsWith("/audit/log", nav.Uri);
}
/// <summary>Verifies that a nonzero error rate below ten percent gets a warning border rather than a danger border.</summary>
[Fact]
public void NonzeroErrorRate_GetsWarningBorder_NotDangerBelowTenPercent()
{
@@ -144,6 +152,7 @@ public class AuditKpiTilesTests : BunitContext
Assert.DoesNotContain("border-danger", tile.GetAttribute("class") ?? string.Empty);
}
/// <summary>Verifies that a high error rate gets a danger border.</summary>
[Fact]
public void HighErrorRate_GetsDangerBorder()
{
@@ -8,7 +8,7 @@ using ZB.MOM.WW.ScadaBridge.Commons.Messages.Audit;
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Components.Health;
/// <summary>
/// bUnit tests for <see cref="SiteCallKpiTiles"/> (Site Call Audit #22, Task 7).
/// bUnit tests for <see cref="SiteCallKpiTiles"/> .
/// The component renders three Bootstrap-card tiles — Buffered, Stuck, Parked —
/// from a single <see cref="SiteCallKpiResponse"/> snapshot. The tests pin:
///
@@ -35,6 +35,7 @@ public class SiteCallKpiTilesTests : BunitContext
OldestPendingAge: null,
StuckCount: stuck);
/// <summary>Verifies that the component renders three tiles from a snapshot.</summary>
[Fact]
public void Renders_ThreeTiles_FromSnapshot()
{
@@ -54,6 +55,7 @@ public class SiteCallKpiTilesTests : BunitContext
Assert.Contains(">3<", cut.Markup); // parked
}
/// <summary>Verifies that an unavailable snapshot renders em dashes and the error message.</summary>
[Fact]
public void UnavailableSnapshot_RendersEmDashes_AndErrorMessage()
{
@@ -69,6 +71,7 @@ public class SiteCallKpiTilesTests : BunitContext
Assert.Contains("site call repository unavailable", cut.Markup);
}
/// <summary>Verifies that the parked tile gets a danger border when the parked count is above zero.</summary>
[Fact]
public void ParkedTile_GetsDangerBorder_WhenParkedAboveZero()
{
@@ -80,6 +83,7 @@ public class SiteCallKpiTilesTests : BunitContext
Assert.Contains("border-danger", tile.GetAttribute("class") ?? string.Empty);
}
/// <summary>Verifies that the parked tile has no danger border when the parked count is zero.</summary>
[Fact]
public void ParkedTile_NoDangerBorder_WhenParkedZero()
{
@@ -91,6 +95,7 @@ public class SiteCallKpiTilesTests : BunitContext
Assert.DoesNotContain("border-danger", tile.GetAttribute("class") ?? string.Empty);
}
/// <summary>Verifies that the stuck tile gets a warning border when the stuck count is above zero.</summary>
[Fact]
public void StuckTile_GetsWarningBorder_WhenStuckAboveZero()
{
@@ -104,6 +109,7 @@ public class SiteCallKpiTilesTests : BunitContext
Assert.DoesNotContain("border-danger", tile.GetAttribute("class") ?? string.Empty);
}
/// <summary>Verifies that the stuck tile has no warning border when the stuck count is zero.</summary>
[Fact]
public void StuckTile_NoWarningBorder_WhenStuckZero()
{
@@ -115,6 +121,7 @@ public class SiteCallKpiTilesTests : BunitContext
Assert.DoesNotContain("border-warning", tile.GetAttribute("class") ?? string.Empty);
}
/// <summary>Verifies that the buffered tile never gets a threshold border, even with a high count.</summary>
[Fact]
public void BufferedTile_HasNoThresholdBorder_EvenWithHighCount()
{
@@ -130,6 +137,7 @@ public class SiteCallKpiTilesTests : BunitContext
Assert.DoesNotContain("border-warning", cls);
}
/// <summary>Verifies that clicking the buffered tile navigates to the unfiltered site calls report.</summary>
[Fact]
public void BufferedTile_Click_NavigatesToUnfilteredSiteCallsReport()
{
@@ -145,6 +153,7 @@ public class SiteCallKpiTilesTests : BunitContext
Assert.EndsWith("/site-calls/report", nav.Uri);
}
/// <summary>Verifies that clicking the stuck tile navigates to the site calls report with the stuck filter.</summary>
[Fact]
public void StuckTile_Click_NavigatesToSiteCallsReport_WithStuckFilter()
{
@@ -160,6 +169,7 @@ public class SiteCallKpiTilesTests : BunitContext
Assert.Contains("/site-calls/report?stuck=true", nav.Uri);
}
/// <summary>Verifies that clicking the parked tile navigates to the site calls report with the parked status filter.</summary>
[Fact]
public void ParkedTile_Click_NavigatesToSiteCallsReport_WithParkedStatusFilter()
{