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
@@ -31,7 +31,7 @@ using TransportImportPage = ZB.MOM.WW.ScadaBridge.CentralUI.Components.Pages.Des
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Pages;
/// <summary>
/// CentralUI-033: tests for the drill-in / query-string code paths on the two
/// Tests for the drill-in / query-string code paths on the two
/// newest pages (TransportImport + SiteCallsReport). The base happy-path cases
/// (Parked, stuck=true, no params) live next to the rest of the page's tests in
/// <c>SiteCallsReportPageTests</c> / <c>TransportImportPageTests</c>; this file
@@ -40,12 +40,12 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Pages;
/// </summary>
public sealed class QueryStringDrillInTests
{
// STM: CentralUI-033-QueryStringDrillIn marker — used by grep verification.
// -----------------------------------------------------------------
// SiteCallsReport — ?status=
// -----------------------------------------------------------------
/// <summary>Verifies that a case-insensitive status query parameter on the site calls report normalises to the canonical casing.</summary>
[Fact]
public void SiteCallsReport_StatusParam_CaseInsensitiveMatch_NormalisesToCanonicalCasing()
{
@@ -68,6 +68,7 @@ public sealed class QueryStringDrillInTests
});
}
/// <summary>Verifies that an unrecognised status query parameter on the site calls report is silently dropped.</summary>
[Fact]
public void SiteCallsReport_StatusParam_Unrecognised_IsSilentlyDropped()
{
@@ -88,6 +89,7 @@ public sealed class QueryStringDrillInTests
});
}
/// <summary>Verifies that a non-boolean stuck query parameter on the site calls report is silently dropped.</summary>
[Fact]
public void SiteCallsReport_StuckParam_NonBoolean_IsSilentlyDropped()
{
@@ -110,6 +112,7 @@ public sealed class QueryStringDrillInTests
// SiteCallsReport — ?correlationId= (Flow Debugger / Audit Log deep link, D2)
// -----------------------------------------------------------------
/// <summary>Verifies that the correlation id query parameter seeds the operation filter on the site calls report.</summary>
[Fact]
public void SiteCallsReport_CorrelationIdQuery_SeedsTheOperationFilter()
{
@@ -131,6 +134,7 @@ public sealed class QueryStringDrillInTests
});
}
/// <summary>Verifies that a malformed correlation id query parameter on the site calls report is ignored.</summary>
[Fact]
public void SiteCallsReport_CorrelationIdQuery_Malformed_IsIgnored()
{
@@ -155,6 +159,7 @@ public sealed class QueryStringDrillInTests
// NotificationReport — ?correlationId= (Flow Debugger follow-ups, D2)
// -----------------------------------------------------------------
/// <summary>Verifies that a blank correlation id query parameter on the notification report is ignored.</summary>
[Fact]
public void NotificationReport_CorrelationIdQuery_Blank_IsIgnored()
{
@@ -180,7 +185,7 @@ public sealed class QueryStringDrillInTests
// -----------------------------------------------------------------
/// <summary>
/// CentralUI-033: TransportImport.razor declares no <c>[Parameter]</c> /
/// TransportImport.razor declares no <c>[Parameter]</c> /
/// <c>SupplyParameterFromQuery</c> bindings — the wizard's initial state is
/// purely <c>ImportWizardStep.Upload</c> regardless of the query-string. This
/// test pins that contract: navigating with an unrecognised query-string
@@ -204,7 +209,7 @@ public sealed class QueryStringDrillInTests
.GetValue(cut.Instance)!;
Assert.Equal(TransportImportPage.ImportWizardStep.Upload, step);
// And the Step-1 InputFile control is rendered — the page came up clean.
// And the first-step InputFile control is rendered — the page came up clean.
Assert.NotNull(cut.Find("input[type='file']"));
}
@@ -222,6 +227,7 @@ public sealed class QueryStringDrillInTests
public readonly CommunicationService Comms;
public readonly List<SiteCallQueryRequest> QueryRequests = new();
/// <summary>Initializes a new instance of the <c>SiteCallsReportFixture</c> class.</summary>
public SiteCallsReportFixture()
{
Comms = new CommunicationService(
@@ -233,7 +239,7 @@ public sealed class QueryStringDrillInTests
Services.AddSingleton(Comms);
Services.AddSingleton<IDialogService>(new AlwaysConfirmDialogService());
// M6 (K14): the SiteCallsReport page now injects IKpiHistoryQueryService
// The SiteCallsReport page now injects IKpiHistoryQueryService
// for the Trends section. Provide a stand-in so these drill-in tests render.
Services.AddSingleton(Substitute.For<IKpiHistoryQueryService>());
@@ -257,6 +263,7 @@ public sealed class QueryStringDrillInTests
Services.AddScoped<ZB.MOM.WW.ScadaBridge.CentralUI.Auth.SiteScopeService>();
}
/// <inheritdoc />
protected override void Dispose(bool disposing)
{
if (disposing)
@@ -269,6 +276,8 @@ public sealed class QueryStringDrillInTests
private sealed class ScriptedSiteCallAuditActor : ReceiveActor
{
/// <summary>Initializes a new instance of the <c>ScriptedSiteCallAuditActor</c> class.</summary>
/// <param name="fixture">The fixture supplying the scripted replies.</param>
public ScriptedSiteCallAuditActor(SiteCallsReportFixture fixture)
{
Receive<SiteCallQueryRequest>(req =>
@@ -287,6 +296,7 @@ public sealed class QueryStringDrillInTests
public readonly CommunicationService Comms;
public readonly List<NotificationOutboxQueryRequest> QueryRequests = new();
/// <summary>Initializes a new instance of the <c>NotificationReportFixture</c> class.</summary>
public NotificationReportFixture()
{
Comms = new CommunicationService(
@@ -319,6 +329,7 @@ public sealed class QueryStringDrillInTests
Services.AddScoped<ZB.MOM.WW.ScadaBridge.CentralUI.Auth.SiteScopeService>();
}
/// <inheritdoc />
protected override void Dispose(bool disposing)
{
if (disposing)
@@ -331,6 +342,8 @@ public sealed class QueryStringDrillInTests
private sealed class ScriptedNotificationOutboxActor : ReceiveActor
{
/// <summary>Initializes a new instance of the <c>ScriptedNotificationOutboxActor</c> class.</summary>
/// <param name="fixture">The fixture supplying the scripted replies.</param>
public ScriptedNotificationOutboxActor(NotificationReportFixture fixture)
{
Receive<NotificationOutboxQueryRequest>(req =>
@@ -345,17 +358,26 @@ public sealed class QueryStringDrillInTests
private sealed class AlwaysConfirmDialogService : IDialogService
{
/// <inheritdoc />
public Task<bool> ConfirmAsync(string title, string message, bool danger = false, string? confirmLabel = null)
=> Task.FromResult(true);
// Register row 75 added a DialogSeverity overload. This stub auto-confirms
// regardless of severity — it exists to let action paths run end to end, not to
// assert anything about styling.
/// <inheritdoc />
public Task<bool> ConfirmAsync(string title, string message, DialogSeverity severity, string? confirmLabel = null)
=> Task.FromResult(true);
/// <inheritdoc />
public Task<string?> PromptAsync(string title, string label, string initialValue = "", string? placeholder = null)
=> Task.FromResult<string?>(null);
/// <summary>Returns the default result without showing a dialog.</summary>
/// <typeparam name="TResult">The dialog result type.</typeparam>
/// <param name="title">The dialog title.</param>
/// <param name="body">The dialog body fragment.</param>
/// <param name="size">The optional dialog size.</param>
/// <returns>A task that resolves to the default result.</returns>
public Task<TResult?> ShowAsync<TResult>(
string title,
Microsoft.AspNetCore.Components.RenderFragment<DialogContext<TResult>> body,
@@ -365,6 +387,7 @@ public sealed class QueryStringDrillInTests
private sealed class TransportImportFixture : BunitContext
{
/// <summary>Initializes a new instance of the <c>TransportImportFixture</c> class.</summary>
public TransportImportFixture()
{
JSInterop.Mode = JSRuntimeMode.Loose;
@@ -372,7 +395,7 @@ public sealed class QueryStringDrillInTests
var importer = Substitute.For<IBundleImporter>();
Services.AddSingleton(importer);
Services.AddSingleton(Substitute.For<IAuditService>());
// M8 E2: TransportImport's Map step injects ISiteRepository.
// TransportImport's Map step injects ISiteRepository.
Services.AddSingleton(Substitute.For<ISiteRepository>());
// Register row 44: the wizard reads the circuit's client IP for the
// per-IP unlock throttle. No HTTP context under bUnit — use the seam.