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:
+21
@@ -65,6 +65,7 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
DeliveredAt: DateTimeOffset.UtcNow.AddHours(-2), IsStuck: false),
|
||||
}, TotalCount: 2);
|
||||
|
||||
/// <summary>Initializes the test context, registering the fake outbox actor and dialog service.</summary>
|
||||
public NotificationReportDetailModalTests()
|
||||
{
|
||||
_comms = new CommunicationService(
|
||||
@@ -98,6 +99,7 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
Services.AddScoped<ZB.MOM.WW.ScadaBridge.CentralUI.Auth.SiteScopeService>();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that double click row, opens detail modal.</summary>
|
||||
[Fact]
|
||||
public void DoubleClickRow_OpensDetailModal()
|
||||
{
|
||||
@@ -119,6 +121,7 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that modal, shows full notification id, not truncated.</summary>
|
||||
[Fact]
|
||||
public void Modal_ShowsFullNotificationId_NotTruncated()
|
||||
{
|
||||
@@ -138,6 +141,7 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that close button, dismisses modal.</summary>
|
||||
[Fact]
|
||||
public void CloseButton_DismissesModal()
|
||||
{
|
||||
@@ -156,6 +160,7 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
cut.WaitForAssertion(() => Assert.Empty(cut.FindAll(".modal.show")));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that modal, shows last error, when present.</summary>
|
||||
[Fact]
|
||||
public void Modal_ShowsLastError_WhenPresent()
|
||||
{
|
||||
@@ -173,6 +178,7 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that modal, fetches and shows body.</summary>
|
||||
[Fact]
|
||||
public void Modal_FetchesAndShowsBody()
|
||||
{
|
||||
@@ -192,6 +198,7 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that modal, shows recipients, from resolved targets.</summary>
|
||||
[Fact]
|
||||
public void Modal_ShowsRecipients_FromResolvedTargets()
|
||||
{
|
||||
@@ -210,6 +217,7 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that modal, shows list fallback, when resolved targets null.</summary>
|
||||
[Fact]
|
||||
public void Modal_ShowsListFallback_WhenResolvedTargetsNull()
|
||||
{
|
||||
@@ -234,6 +242,7 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that modal, shows error, when detail fetch fails.</summary>
|
||||
[Fact]
|
||||
public void Modal_ShowsError_WhenDetailFetchFails()
|
||||
{
|
||||
@@ -310,6 +319,7 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
cut.WaitForAssertion(() => Assert.Empty(cut.FindAll(".modal.show")));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
@@ -321,6 +331,8 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
|
||||
private sealed class ScriptedOutboxActor : ReceiveActor
|
||||
{
|
||||
/// <summary>Creates the scripted outbox actor bound to the owning test class.</summary>
|
||||
/// <param name="test">The owning test whose scripted responses the actor replays.</param>
|
||||
public ScriptedOutboxActor(NotificationReportDetailModalTests test)
|
||||
{
|
||||
Receive<NotificationOutboxQueryRequest>(_ => Sender.Tell(test._queryReply));
|
||||
@@ -337,19 +349,28 @@ public class NotificationReportDetailModalTests : BunitContext
|
||||
|
||||
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 type of the dialog result.</typeparam>
|
||||
/// <param name="title">The dialog title (ignored).</param>
|
||||
/// <param name="body">The dialog body (ignored).</param>
|
||||
/// <param name="size">The dialog size (ignored).</param>
|
||||
/// <returns>A task whose result is the default value.</returns>
|
||||
public Task<TResult?> ShowAsync<TResult>(
|
||||
string title,
|
||||
Microsoft.AspNetCore.Components.RenderFragment<DialogContext<TResult>> body,
|
||||
|
||||
Reference in New Issue
Block a user