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:
@@ -22,7 +22,7 @@ using ZB.MOM.WW.ScadaBridge.NotificationOutbox.Delivery;
|
||||
namespace ZB.MOM.WW.ScadaBridge.IntegrationTests;
|
||||
|
||||
/// <summary>
|
||||
/// Task 25: end-to-end integration test for the central Notification Outbox flow. Exercises
|
||||
/// End-to-end integration test for the central Notification Outbox flow. Exercises
|
||||
/// the full ingest -> dispatch -> status pipeline against a real <see cref="NotificationOutboxActor"/>,
|
||||
/// a real <see cref="NotificationOutboxRepository"/> over a real (SQLite in-memory) database, and
|
||||
/// a stub <see cref="INotificationDeliveryAdapter"/>. Two scenarios are covered: a successful
|
||||
@@ -39,11 +39,14 @@ public class NotificationOutboxFlowTests : TestKit
|
||||
/// </summary>
|
||||
private sealed class SqliteOutboxDbContext : ScadaBridgeDbContext
|
||||
{
|
||||
/// <summary>Initializes the context over the given SQLite options with an ephemeral data protection provider.</summary>
|
||||
/// <param name="options">The EF Core options configured for the SQLite connection.</param>
|
||||
public SqliteOutboxDbContext(DbContextOptions<ScadaBridgeDbContext> options)
|
||||
: base(options, new EphemeralDataProtectionProvider())
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
@@ -81,10 +84,14 @@ public class NotificationOutboxFlowTests : TestKit
|
||||
{
|
||||
private readonly DeliveryOutcome _outcome;
|
||||
|
||||
/// <summary>Initializes the adapter with the outcome every delivery returns.</summary>
|
||||
/// <param name="outcome">The fixed delivery outcome to return.</param>
|
||||
public StubEmailAdapter(DeliveryOutcome outcome) => _outcome = outcome;
|
||||
|
||||
/// <inheritdoc />
|
||||
public NotificationType Type => NotificationType.Email;
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<DeliveryOutcome> DeliverAsync(
|
||||
Notification notification, CancellationToken cancellationToken = default)
|
||||
=> Task.FromResult(_outcome);
|
||||
@@ -97,15 +104,21 @@ public class NotificationOutboxFlowTests : TestKit
|
||||
/// </summary>
|
||||
private sealed class OutboxHarness : IDisposable
|
||||
{
|
||||
/// <summary>Gets the kept-open SQLite connection.</summary>
|
||||
public SqliteConnection Connection { get; }
|
||||
/// <summary>Gets the composed service provider.</summary>
|
||||
public IServiceProvider Services { get; }
|
||||
|
||||
/// <summary>Initializes the harness with the connection and service provider it owns.</summary>
|
||||
/// <param name="connection">The kept-open SQLite connection.</param>
|
||||
/// <param name="services">The composed service provider.</param>
|
||||
public OutboxHarness(SqliteConnection connection, IServiceProvider services)
|
||||
{
|
||||
Connection = connection;
|
||||
Services = services;
|
||||
}
|
||||
|
||||
/// <summary>Releases the resources held by this test class.</summary>
|
||||
public void Dispose()
|
||||
{
|
||||
(Services as IDisposable)?.Dispose();
|
||||
@@ -182,11 +195,12 @@ public class NotificationOutboxFlowTests : TestKit
|
||||
|
||||
/// <summary>
|
||||
/// Test-only no-op <see cref="ICentralAuditWriter"/>. The integration tests
|
||||
/// in this file pre-date M4 Bundle B's audit-writer injection; they do not
|
||||
/// in this file pre-date the audit-writer injection; they do not
|
||||
/// assert on emission, just need a non-null collaborator.
|
||||
/// </summary>
|
||||
private sealed class NoOpCentralAuditWriter : ICentralAuditWriter
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public Task WriteAsync(AuditEvent evt, CancellationToken ct = default) => Task.CompletedTask;
|
||||
}
|
||||
|
||||
@@ -210,6 +224,7 @@ public class NotificationOutboxFlowTests : TestKit
|
||||
return await repository.GetByIdAsync(notificationId);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a successfully dispatched notification reaches the Delivered status.</summary>
|
||||
[Fact]
|
||||
public void Submit_DispatchedSuccessfully_ReachesDeliveredStatus()
|
||||
{
|
||||
@@ -239,6 +254,7 @@ public class NotificationOutboxFlowTests : TestKit
|
||||
interval: TimeSpan.FromMilliseconds(100));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a permanently failed notification reaches Parked and a retry returns it to Pending.</summary>
|
||||
[Fact]
|
||||
public void Submit_PermanentlyFailed_ReachesParked_ThenRetryReturnsToPending()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user