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:
@@ -29,10 +29,11 @@ public sealed class BundleSessionStoreTests
|
||||
Summary: new BundleSummary(0, 0, 0, 0, 0, 0, 0, 0),
|
||||
Contents: Array.Empty<ManifestContentEntry>());
|
||||
|
||||
/// <summary>Verifies that opening beyond the maximum concurrent import sessions throws, and removing one admits a new session.</summary>
|
||||
[Fact]
|
||||
public void Open_beyond_MaxConcurrentImportSessions_throws_and_removing_one_admits_a_new_session()
|
||||
{
|
||||
// #05-T24: the store bounds concurrently-open sessions (each pins a
|
||||
// The store bounds concurrently-open sessions (each pins a
|
||||
// decrypted bundle in memory). The (cap+1)th Open is rejected; freeing a
|
||||
// slot re-admits a new session.
|
||||
var clock = new TestTimeProvider(DateTimeOffset.UtcNow);
|
||||
@@ -59,6 +60,7 @@ public sealed class BundleSessionStoreTests
|
||||
Assert.NotNull(sut.Get(overflow.SessionId));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that opening a session and then getting it returns the session.</summary>
|
||||
[Fact]
|
||||
public void Open_then_Get_returns_session()
|
||||
{
|
||||
@@ -73,6 +75,7 @@ public sealed class BundleSessionStoreTests
|
||||
Assert.Same(session, fetched);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that getting a session after its time-to-live returns null and evicts it.</summary>
|
||||
[Fact]
|
||||
public void Get_after_TTL_returns_null_and_evicts()
|
||||
{
|
||||
@@ -90,6 +93,7 @@ public sealed class BundleSessionStoreTests
|
||||
Assert.Null(sut.Get(session.SessionId));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that removing a session evicts it.</summary>
|
||||
[Fact]
|
||||
public void Remove_evicts_session()
|
||||
{
|
||||
@@ -103,6 +107,7 @@ public sealed class BundleSessionStoreTests
|
||||
Assert.Null(sut.Get(session.SessionId));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that eviction removes every session past its time-to-live.</summary>
|
||||
[Fact]
|
||||
public void EvictExpired_removes_all_past_ttl()
|
||||
{
|
||||
@@ -125,6 +130,7 @@ public sealed class BundleSessionStoreTests
|
||||
Assert.Null(sut.Get(dropB.SessionId));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the legacy failed-unlock-attempts field still round-trips through the shared reference.</summary>
|
||||
[Fact]
|
||||
public void Legacy_FailedUnlockAttempts_field_still_round_trips_via_shared_reference()
|
||||
{
|
||||
@@ -155,6 +161,7 @@ public sealed class BundleSessionStoreTests
|
||||
Assert.True(refetch!.Locked);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the unlock failure count is tracked per bundle and resets.</summary>
|
||||
[Fact]
|
||||
public void UnlockFailureCount_TracksPerBundleAndResets()
|
||||
{
|
||||
@@ -179,6 +186,7 @@ public sealed class BundleSessionStoreTests
|
||||
Assert.Equal(0, sut.GetUnlockFailureCount(contentHashA));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that unlock failures expire on the time-to-live and get returns zero.</summary>
|
||||
[Fact]
|
||||
public void UnlockFailures_ExpireOnTtlAndGetReturnsZero()
|
||||
{
|
||||
@@ -197,6 +205,7 @@ public sealed class BundleSessionStoreTests
|
||||
Assert.Equal(0, sut.GetUnlockFailureCount(contentHash));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that evicting expired entries clears stale unlock failure entries.</summary>
|
||||
[Fact]
|
||||
public void UnlockFailures_EvictExpired_ClearsStaleEntries()
|
||||
{
|
||||
@@ -220,8 +229,13 @@ public sealed class BundleSessionStoreTests
|
||||
private sealed class TestTimeProvider : TimeProvider
|
||||
{
|
||||
private DateTimeOffset _now;
|
||||
/// <summary>Initializes the provider with the given start time.</summary>
|
||||
/// <param name="start">The initial UTC time.</param>
|
||||
public TestTimeProvider(DateTimeOffset start) { _now = start; }
|
||||
/// <inheritdoc />
|
||||
public override DateTimeOffset GetUtcNow() => _now;
|
||||
/// <summary>Advances the provider's current time.</summary>
|
||||
/// <param name="by">The amount of time to advance.</param>
|
||||
public void Advance(TimeSpan by) => _now = _now.Add(by);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user