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:
@@ -45,8 +45,10 @@ public class DispatchCoverageTests : TestKit, IDisposable
|
||||
&& !t.IsAbstract
|
||||
&& ManagementCommandRegistry.Resolve(t.Name[..^"Command".Length]) == t);
|
||||
|
||||
/// <inheritdoc />
|
||||
void IDisposable.Dispose() => Shutdown();
|
||||
|
||||
/// <summary>Verifies that every registered command reaches a dispatch arm.</summary>
|
||||
[Fact]
|
||||
public void EveryRegisteredCommand_ReachesADispatchArm()
|
||||
{
|
||||
@@ -117,6 +119,7 @@ public class DispatchCoverageTests : TestKit, IDisposable
|
||||
return Sys.ActorOf(Props.Create(() => new ManagementActor(rootProvider, logger)));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the probe detects a command without a dispatch arm.</summary>
|
||||
[Fact]
|
||||
public void Probe_DetectsACommandWithoutADispatchArm()
|
||||
{
|
||||
@@ -135,7 +138,9 @@ public class DispatchCoverageTests : TestKit, IDisposable
|
||||
// commands before DispatchCommand had a chance to select (or miss) their arm.
|
||||
private sealed class PassthroughTransaction(IServiceProvider provider) : IConfigurationCommandTransaction
|
||||
{
|
||||
/// <summary>The number of operations dispatched through this transaction.</summary>
|
||||
public int DispatchCount { get; private set; }
|
||||
/// <inheritdoc />
|
||||
public Task<object?> ExecuteAsync(Func<IServiceProvider, Task<object?>> operation)
|
||||
{
|
||||
DispatchCount++;
|
||||
@@ -147,6 +152,7 @@ public class DispatchCoverageTests : TestKit, IDisposable
|
||||
/// "no dispatch arm" <see cref="NotSupportedException"/> signature.</summary>
|
||||
private sealed class SentinelException : Exception
|
||||
{
|
||||
/// <summary>Initializes the exception with a fixed sentinel message.</summary>
|
||||
public SentinelException() : base("sentinel: scoped provider touched") { }
|
||||
}
|
||||
|
||||
@@ -157,12 +163,24 @@ public class DispatchCoverageTests : TestKit, IDisposable
|
||||
/// </summary>
|
||||
private sealed class RecordingLogger<T> : ILogger<T>
|
||||
{
|
||||
/// <summary>The exception logged for each correlation id.</summary>
|
||||
public ConcurrentDictionary<string, Exception> Captured { get; } = new();
|
||||
|
||||
/// <inheritdoc />
|
||||
IDisposable? ILogger.BeginScope<TState>(TState state) => null;
|
||||
|
||||
/// <summary>Reports every log level as enabled.</summary>
|
||||
/// <param name="logLevel">The log level being checked.</param>
|
||||
/// <returns>Always <see langword="true"/>.</returns>
|
||||
public bool IsEnabled(LogLevel logLevel) => true;
|
||||
|
||||
/// <summary>Captures the logged exception under its correlation id.</summary>
|
||||
/// <typeparam name="TState">The type of the log state.</typeparam>
|
||||
/// <param name="logLevel">The log level.</param>
|
||||
/// <param name="eventId">The event id.</param>
|
||||
/// <param name="state">The log state, searched for a correlation id.</param>
|
||||
/// <param name="exception">The exception being logged, if any.</param>
|
||||
/// <param name="formatter">The message formatter.</param>
|
||||
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state,
|
||||
Exception? exception, Func<TState, Exception?, string> formatter)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user