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:
+9
-4
@@ -17,7 +17,7 @@ using ZB.MOM.WW.ScadaBridge.TemplateEngine.Flattening;
|
||||
namespace ZB.MOM.WW.ScadaBridge.DeploymentManager.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// CentralUI-006: regression tests proving <see cref="DeploymentService"/>
|
||||
/// Regression tests proving <see cref="DeploymentService"/>
|
||||
/// raises <see cref="IDeploymentStatusNotifier.StatusChanged"/> whenever it
|
||||
/// writes a deployment record's status. This is the event source the Central
|
||||
/// UI deployment-status page subscribes to instead of polling.
|
||||
@@ -32,6 +32,7 @@ public class DeploymentStatusNotifierTests : TestKit
|
||||
private readonly DeploymentStatusNotifier _notifier;
|
||||
private readonly DeploymentService _service;
|
||||
|
||||
/// <summary>Initializes the test class with a notifier substitute and a deployment service wired to stubbed repositories.</summary>
|
||||
public DeploymentStatusNotifierTests()
|
||||
{
|
||||
_repo = Substitute.For<IDeploymentManagerRepository>();
|
||||
@@ -48,7 +49,7 @@ public class DeploymentStatusNotifierTests : TestKit
|
||||
OperationLockTimeout = TimeSpan.FromSeconds(5)
|
||||
});
|
||||
|
||||
// DeploymentManager-021: the resolver now throws when the site row
|
||||
// The resolver now throws when the site row
|
||||
// is missing, so seed the substitute to return a real-shaped Site for
|
||||
// any id these tests touch.
|
||||
var siteRepo = Substitute.For<ISiteRepository>();
|
||||
@@ -63,13 +64,15 @@ public class DeploymentStatusNotifierTests : TestKit
|
||||
_repo, siteRepo, _pipeline, _comms, _lockManager, _audit,
|
||||
new DiffService(), new RevisionHashService(), _notifier,
|
||||
Substitute.For<IStaleInstanceProbe>(), options,
|
||||
// Notify-and-fetch (Task 6): a non-empty CentralFetchBaseUrl lets the
|
||||
// Notify-and-fetch: a non-empty CentralFetchBaseUrl lets the
|
||||
// deploy path reach the send (and, here, the catch block) rather than
|
||||
// tripping the fail-fast configuration guard.
|
||||
Options.Create(new CommunicationOptions { CentralFetchBaseUrl = "https://central.test:9000" }),
|
||||
NullLogger<DeploymentService>.Instance);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that deploying an instance raises a status change for every deployment record status write.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task DeployInstanceAsync_RaisesStatusChange_ForEveryRecordStatusWrite()
|
||||
{
|
||||
@@ -88,7 +91,7 @@ public class DeploymentStatusNotifierTests : TestKit
|
||||
// the record ends Failed. The notifier must fire for the InProgress
|
||||
// and Failed writes — not be silent (the pre-fix behaviour).
|
||||
//
|
||||
// DeploymentManager-022: the transient Pending write was dropped from
|
||||
// The transient Pending write was dropped from
|
||||
// the deploy path (the record is now created directly in InProgress),
|
||||
// so there is no Pending notification any more. The remaining two
|
||||
// writes — the initial InProgress insert and the catch-block Failed
|
||||
@@ -108,6 +111,7 @@ public class DeploymentStatusNotifierTests : TestKit
|
||||
Assert.All(changes, c => Assert.Equal(deploymentId, c.DeploymentId));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that notifying a status change with no subscribers does not throw.</summary>
|
||||
[Fact]
|
||||
public void NotifyStatusChanged_WithNoSubscribers_DoesNotThrow()
|
||||
{
|
||||
@@ -119,6 +123,7 @@ public class DeploymentStatusNotifierTests : TestKit
|
||||
Assert.Null(ex);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a throwing subscriber does not prevent other subscribers from being notified.</summary>
|
||||
[Fact]
|
||||
public void NotifyStatusChanged_ThrowingSubscriber_DoesNotBreakOtherSubscribers()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user