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
@@ -15,7 +15,7 @@ using ZB.MOM.WW.ScadaBridge.NotificationOutbox.Messages;
namespace ZB.MOM.WW.ScadaBridge.NotificationOutbox.Tests;
/// <summary>
/// M4 Bundle B (B2) — verifies the <see cref="NotificationOutboxActor"/>
/// Verifies the <see cref="NotificationOutboxActor"/>
/// dispatcher loop emits exactly ONE
/// <see cref="AuditChannel.Notification"/>/<see cref="AuditKind.NotifyDeliver"/>
/// audit row with <see cref="AuditStatus.Attempted"/> per attempt regardless of
@@ -39,12 +39,15 @@ public class NotificationOutboxActorAttemptEmissionTests : TestKit
/// </summary>
private sealed class RecordingCentralAuditWriter : ICentralAuditWriter
{
// C3 (Task 2.5): store the decomposed row view so assertions keep
// Store the decomposed row view so assertions keep
// reading the ScadaBridge domain fields (Channel/Kind/Status/…) as
// typed properties; the canonical record carries them in DetailsJson.
/// <summary>Gets the decomposed audit rows captured by the writer.</summary>
public List<AuditRowProjection.AuditRowValues> Events { get; } = new();
/// <summary>Gets or sets an optional callback invoked on every write, used to simulate writer faults.</summary>
public Func<AuditEvent, Task>? OnWrite { get; set; }
/// <inheritdoc />
public Task WriteAsync(AuditEvent evt, CancellationToken ct = default)
{
lock (Events)
@@ -74,10 +77,14 @@ public class NotificationOutboxActorAttemptEmissionTests : TestKit
private readonly Func<DeliveryOutcome> _outcome;
public int CallCount;
/// <summary>Initializes the adapter with the outcome factory it returns on each delivery.</summary>
/// <param name="outcome">Factory producing the delivery outcome for each call.</param>
public StubAdapter(Func<DeliveryOutcome> outcome) { _outcome = outcome; }
/// <inheritdoc />
public NotificationType Type => NotificationType.Email;
/// <inheritdoc />
public Task<DeliveryOutcome> DeliverAsync(
Notification notification, CancellationToken cancellationToken = default)
{
@@ -138,6 +145,7 @@ public class NotificationOutboxActorAttemptEmissionTests : TestKit
}
}
/// <summary>Verifies that a successful attempt emits one NotifyDeliver audit event with Attempted status.</summary>
[Fact]
public void Attempt_Success_EmitsOneEvent_KindNotifyDeliver_StatusAttempted()
{
@@ -170,10 +178,11 @@ public class NotificationOutboxActorAttemptEmissionTests : TestKit
});
}
/// <summary>Verifies that the attempt event carries the notification's origin execution id as its execution id.</summary>
[Fact]
public void Attempt_CarriesOriginExecutionId_AsExecutionId()
{
// Audit Log #23: the Attempted NotifyDeliver row must echo the
// The Attempted NotifyDeliver row must echo the
// notification's OriginExecutionId so all rows for one run share an id.
SetupSmtpRetryPolicy(maxRetries: 5, retryDelay: TimeSpan.FromMinutes(1));
var executionId = Guid.NewGuid();
@@ -193,6 +202,7 @@ public class NotificationOutboxActorAttemptEmissionTests : TestKit
});
}
/// <summary>Verifies that a null origin execution id yields a null execution id on the attempt event.</summary>
[Fact]
public void Attempt_NullOriginExecutionId_HasNullExecutionId()
{
@@ -213,6 +223,7 @@ public class NotificationOutboxActorAttemptEmissionTests : TestKit
});
}
/// <summary>Verifies that the attempt event carries the notification's origin parent execution id as its parent execution id.</summary>
[Fact]
public void Attempt_CarriesOriginParentExecutionId_AsParentExecutionId()
{
@@ -237,6 +248,7 @@ public class NotificationOutboxActorAttemptEmissionTests : TestKit
});
}
/// <summary>Verifies that a null origin parent execution id yields a null parent execution id on the attempt event.</summary>
[Fact]
public void Attempt_NullOriginParentExecutionId_HasNullParentExecutionId()
{
@@ -257,6 +269,7 @@ public class NotificationOutboxActorAttemptEmissionTests : TestKit
});
}
/// <summary>Verifies that a transient failure emits an Attempted event with the error message set.</summary>
[Fact]
public void Attempt_TransientFailure_EmitsEvent_StatusAttempted_ErrorMessageSet()
{
@@ -278,6 +291,7 @@ public class NotificationOutboxActorAttemptEmissionTests : TestKit
});
}
/// <summary>Verifies that a permanent failure emits an Attempted event with the error message set.</summary>
[Fact]
public void Attempt_PermanentFailure_EmitsEvent_StatusAttempted_ErrorMessageSet()
{
@@ -299,6 +313,7 @@ public class NotificationOutboxActorAttemptEmissionTests : TestKit
});
}
/// <summary>Verifies that a throwing audit writer does not prevent the delivery state update from succeeding.</summary>
[Fact]
public void AuditWriter_Throws_DeliveryStateUpdate_StillSucceeds()
{
@@ -323,6 +338,7 @@ public class NotificationOutboxActorAttemptEmissionTests : TestKit
});
}
/// <summary>Verifies that the attempt event records its occurrence time in UTC.</summary>
[Fact]
public void Attempt_RecordsOccurredAtUtc_AsUtc()
{