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,6 +22,7 @@ public class PendingUpdatesCacheTests : IDisposable
|
||||
private readonly IPendingUpdatesEvaluator _evaluator = Substitute.For<IPendingUpdatesEvaluator>();
|
||||
private readonly ServiceProvider _provider;
|
||||
|
||||
/// <summary>Initializes a service provider that resolves the substitute pending-updates evaluator.</summary>
|
||||
public PendingUpdatesCacheTests()
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
@@ -40,6 +41,8 @@ public class PendingUpdatesCacheTests : IDisposable
|
||||
private static PendingUpdatesSnapshot Snapshot() =>
|
||||
new(T0, Array.Empty<SitePendingUpdates>());
|
||||
|
||||
/// <summary>Verifies that concurrent callers share a single evaluation.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ConcurrentCallers_ShareOneEvaluation()
|
||||
{
|
||||
@@ -56,6 +59,8 @@ public class PendingUpdatesCacheTests : IDisposable
|
||||
Assert.All(results, r => Assert.Same(results[0], r));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a call within the TTL serves the memoized value without re-evaluating.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task WithinTtl_ServesTheMemoizedValue_WithoutReEvaluating()
|
||||
{
|
||||
@@ -69,6 +74,8 @@ public class PendingUpdatesCacheTests : IDisposable
|
||||
Assert.Same(first, second);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a forced refresh bypasses a still-fresh cached value.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ForceRefresh_BypassesAFreshValue()
|
||||
{
|
||||
@@ -85,6 +92,8 @@ public class PendingUpdatesCacheTests : IDisposable
|
||||
Assert.Same(snapshotB, forced);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a forced refresh still joins an evaluation that is already in flight.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ForceRefresh_StillJoinsAnInFlightRound()
|
||||
{
|
||||
@@ -106,6 +115,8 @@ public class PendingUpdatesCacheTests : IDisposable
|
||||
await _evaluator.Received(1).EvaluateAsync(Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a failed evaluation surfaces to the caller and is not memoized.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task FailedEvaluation_SurfacesToTheCaller_AndIsNotMemoized()
|
||||
{
|
||||
@@ -125,5 +136,6 @@ public class PendingUpdatesCacheTests : IDisposable
|
||||
await _evaluator.Received(2).EvaluateAsync(Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Releases the resources held by the test fixture.</summary>
|
||||
public void Dispose() => _provider.Dispose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user