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
-3
@@ -4,7 +4,7 @@ using ZB.MOM.WW.ScadaBridge.SiteEventLogging;
|
||||
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.TestSupport;
|
||||
|
||||
/// <summary>
|
||||
/// WP3.1 parity pin 3: an <see cref="IServiceProvider"/> that counts
|
||||
/// An <see cref="IServiceProvider"/> that counts
|
||||
/// <see cref="IServiceScopeFactory.CreateScope"/> calls and each scope's
|
||||
/// <see cref="IDisposable.Dispose"/>, so a test can assert that one script run creates
|
||||
/// exactly one DI scope and disposes it exactly once — on the success, failure, AND timeout
|
||||
@@ -24,7 +24,9 @@ public sealed class ScopeSpyServiceProvider(ISiteEventLogger? logger = null)
|
||||
/// <summary>Scope disposals observed so far (double-disposal is counted twice, deliberately).</summary>
|
||||
public int ScopesDisposed => Volatile.Read(ref _scopesDisposed);
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>Resolves the site event logger and this scope factory; every other service resolves to <c>null</c>.</summary>
|
||||
/// <param name="serviceType">The requested service type.</param>
|
||||
/// <returns>The matching service, or <c>null</c> when unsupported.</returns>
|
||||
public object? GetService(Type serviceType)
|
||||
{
|
||||
if (serviceType == typeof(ISiteEventLogger)) return logger;
|
||||
@@ -32,7 +34,8 @@ public sealed class ScopeSpyServiceProvider(ISiteEventLogger? logger = null)
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>Creates a counted scope whose disposal is also counted.</summary>
|
||||
/// <returns>A spy scope.</returns>
|
||||
public IServiceScope CreateScope()
|
||||
{
|
||||
Interlocked.Increment(ref _scopesCreated);
|
||||
@@ -41,8 +44,10 @@ public sealed class ScopeSpyServiceProvider(ISiteEventLogger? logger = null)
|
||||
|
||||
private sealed class SpyScope(ScopeSpyServiceProvider owner) : IServiceScope
|
||||
{
|
||||
/// <summary>Gets the owning provider as the scope's service provider.</summary>
|
||||
public IServiceProvider ServiceProvider => owner;
|
||||
|
||||
/// <summary>Releases the resources held by this instance.</summary>
|
||||
public void Dispose() => Interlocked.Increment(ref owner._scopesDisposed);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user