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:
+8
-2
@@ -3,17 +3,19 @@ using Microsoft.Extensions.Logging.Abstractions;
|
||||
namespace ZB.MOM.WW.ScadaBridge.HealthMonitoring.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// M2.16 (#30) — unit tests for <see cref="SiteEventLogFailureCountReporter"/>.
|
||||
/// Unit tests for <see cref="SiteEventLogFailureCountReporter"/>.
|
||||
/// Verifies that the poller reads the count provided by the
|
||||
/// <see cref="Func{TResult}"/> delegate and pushes it into
|
||||
/// <see cref="ISiteHealthCollector.SetSiteEventLogWriteFailures"/>.
|
||||
/// </summary>
|
||||
public class SiteEventLogFailureCountReporterTests
|
||||
{
|
||||
/// <summary>Verifies that stopping the reporter after it has been disposed does not throw.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task StopAsync_AfterDispose_DoesNotThrow()
|
||||
{
|
||||
// Regression (Gitea #15 follow-up): Dispose tears down the CTS StopAsync
|
||||
// Regression: Dispose tears down the CTS StopAsync
|
||||
// cancels, and the host does not guarantee StopAsync is driven before the DI
|
||||
// container is disposed. Cancel() on a disposed CTS throws, and letting that
|
||||
// escape an IHostedService aborts the host's whole shutdown sequence.
|
||||
@@ -31,6 +33,8 @@ public class SiteEventLogFailureCountReporterTests
|
||||
reporter.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that starting the reporter immediately probes the failed-write count.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task StartAsync_ImmediatelyProbes_FailedWriteCount()
|
||||
{
|
||||
@@ -61,6 +65,8 @@ public class SiteEventLogFailureCountReporterTests
|
||||
await reporter.StopAsync(CancellationToken.None);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the reporter pushes the latest failed-write count on each tick.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task StartAsync_PushesLatestCount_OnEachTick()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user