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:
@@ -13,6 +13,8 @@ public class PassiveSessionRegressionTests
|
||||
{
|
||||
private static readonly DateTimeOffset Start = new(2026, 9, 9, 12, 0, 0, TimeSpan.Zero);
|
||||
|
||||
/// <summary>Verifies that a passive ping refreshes roles without advancing the activity timestamp and that the session then expires.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PassivePing_RefreshesRolesWithoutAdvancingActivity_ThenExpires()
|
||||
{
|
||||
@@ -47,20 +49,51 @@ public class PassiveSessionRegressionTests
|
||||
|
||||
private sealed class Mapper : IGroupRoleMapper<string>
|
||||
{
|
||||
/// <summary>Maps every group to the Viewer role.</summary>
|
||||
/// <param name="groups">The directory groups.</param>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
/// <returns>The canned role mapping.</returns>
|
||||
public Task<GroupRoleMapping<string>> MapAsync(IReadOnlyList<string> groups, CancellationToken ct)
|
||||
=> Task.FromResult(new GroupRoleMapping<string>([Roles.Viewer], new RoleMappingResult([Roles.Viewer], ["2"], false)));
|
||||
}
|
||||
private sealed class Auth : IAuthenticationService
|
||||
{
|
||||
/// <summary>Returns no authentication result.</summary>
|
||||
/// <param name="c">The HTTP context.</param>
|
||||
/// <param name="s">The authentication scheme.</param>
|
||||
/// <returns>An empty authenticate result.</returns>
|
||||
public Task<AuthenticateResult> AuthenticateAsync(HttpContext c, string? s) => Task.FromResult(AuthenticateResult.NoResult());
|
||||
/// <summary>Does nothing.</summary>
|
||||
/// <param name="c">The HTTP context.</param>
|
||||
/// <param name="s">The authentication scheme.</param>
|
||||
/// <param name="p">The authentication properties.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
public Task ChallengeAsync(HttpContext c, string? s, AuthenticationProperties? p) => Task.CompletedTask;
|
||||
/// <summary>Does nothing.</summary>
|
||||
/// <param name="c">The HTTP context.</param>
|
||||
/// <param name="s">The authentication scheme.</param>
|
||||
/// <param name="p">The authentication properties.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
public Task ForbidAsync(HttpContext c, string? s, AuthenticationProperties? p) => Task.CompletedTask;
|
||||
/// <summary>Does nothing.</summary>
|
||||
/// <param name="c">The HTTP context.</param>
|
||||
/// <param name="s">The authentication scheme.</param>
|
||||
/// <param name="u">The principal to sign in.</param>
|
||||
/// <param name="p">The authentication properties.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
public Task SignInAsync(HttpContext c, string? s, ClaimsPrincipal u, AuthenticationProperties? p) => Task.CompletedTask;
|
||||
/// <summary>Does nothing.</summary>
|
||||
/// <param name="c">The HTTP context.</param>
|
||||
/// <param name="s">The authentication scheme.</param>
|
||||
/// <param name="p">The authentication properties.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
public Task SignOutAsync(HttpContext c, string? s, AuthenticationProperties? p) => Task.CompletedTask;
|
||||
}
|
||||
private sealed class Clock : TimeProvider
|
||||
{
|
||||
/// <summary>Gets or sets the current time the clock reports.</summary>
|
||||
public DateTimeOffset Now { get; set; }
|
||||
/// <inheritdoc />
|
||||
public override DateTimeOffset GetUtcNow() => Now;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user