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:
Joseph Doherty
2026-10-07 15:05:49 -04:00
parent 0ffd4bdbea
commit 513fa1aa16
998 changed files with 17896 additions and 2395 deletions
@@ -86,10 +86,14 @@ public class PendingUpdatesIndicatorTests : BunitContext
{
private readonly ClaimsPrincipal _user;
/// <summary>Initializes a new instance of the <c>CountingAuthStateProvider</c> class.</summary>
/// <param name="user">The user whose claims the provider exposes.</param>
public CountingAuthStateProvider(ClaimsPrincipal user) => _user = user;
/// <summary>Gets the calls recorded by this fake.</summary>
public int Calls { get; private set; }
/// <inheritdoc />
public override Task<AuthenticationState> GetAuthenticationStateAsync()
{
Calls++;
@@ -122,6 +126,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
return host.FindComponent<PendingUpdatesIndicator>();
}
/// <summary>Verifies that a user with only the Viewer role sees no pending-updates indicator.</summary>
[Fact]
public void Viewer_RendersNothing()
{
@@ -130,6 +135,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
Assert.True(string.IsNullOrWhiteSpace(cut.Markup));
}
/// <summary>Verifies that a Deployer with nothing pending sees the up-to-date state.</summary>
[Fact]
public void Deployer_WithNothingPending_ShowsUpToDate()
{
@@ -145,6 +151,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
});
}
/// <summary>Verifies that the snapshot is captioned with the instant at which it was computed.</summary>
[Fact]
public void Snapshot_IsCaptionedWithItsComputedInstant()
{
@@ -160,6 +167,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
});
}
/// <summary>Verifies that a user who is both Deployer and Administrator sees the total pending count and both links.</summary>
[Fact]
public void DeployerAndAdministrator_WithPendingWork_ShowsTotalAndBothLinks()
{
@@ -188,6 +196,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
});
}
/// <summary>Verifies that a Deployer without the Administrator role sees the site count as plain text.</summary>
[Fact]
public void DeployerWithoutAdministrator_ShowsSiteCountAsPlainText()
{
@@ -210,6 +219,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
});
}
/// <summary>Verifies that an Administrator without the Deployer role sees the instance count as plain text.</summary>
[Fact]
public void AdministratorWithoutDeployer_ShowsInstanceCountAsPlainText()
{
@@ -227,6 +237,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
});
}
/// <summary>Verifies that a cache fault shows an unavailable state with the fault message as a tooltip.</summary>
[Fact]
public void CacheFault_ShowsUnavailableWithTheMessageAsTooltip()
{
@@ -241,6 +252,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
});
}
/// <summary>Verifies that a site-scoped Deployer is shown counts for the permitted sites only.</summary>
[Fact]
public void SiteScopedDeployer_CountsOnlyPermittedSites()
{
@@ -264,6 +276,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
});
}
/// <summary>Verifies that disposing the component after it has rendered does not throw.</summary>
[Fact]
public void Dispose_AfterRender_DoesNotThrow()
{
@@ -278,6 +291,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
instance.Dispose();
}
/// <summary>Verifies that a cascaded authentication state is used instead of asking the authentication state provider.</summary>
[Fact]
public void CascadedAuthenticationState_IsUsedInsteadOfAskingTheProvider()
{
@@ -296,6 +310,8 @@ public class PendingUpdatesIndicatorTests : BunitContext
Assert.Equal(0, anonymous.Calls);
}
/// <summary>Verifies that polling does not resolve any further authentication state.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Polling_ResolvesNoFurtherAuthenticationState()
{
@@ -331,6 +347,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
Assert.Contains("2 instances", cut.Markup);
}
/// <summary>Verifies that an authentication state change hides the indicator when the role is revoked.</summary>
[Fact]
public void AuthenticationStateChange_HidesTheBlockWhenTheRoleIsRevoked()
{
@@ -358,11 +375,16 @@ public class PendingUpdatesIndicatorTests : BunitContext
{
private ClaimsPrincipal _user;
/// <summary>Initializes a new instance of the <c>MutableAuthStateProvider</c> class.</summary>
/// <param name="user">The user whose claims the provider exposes.</param>
public MutableAuthStateProvider(ClaimsPrincipal user) => _user = user;
/// <inheritdoc />
public override Task<AuthenticationState> GetAuthenticationStateAsync()
=> Task.FromResult(new AuthenticationState(_user));
/// <summary>Replaces the user returned by the provider and notifies listeners of the authentication state change.</summary>
/// <param name="user">The user whose claims the provider exposes.</param>
public void SetUser(ClaimsPrincipal user)
{
_user = user;
@@ -370,6 +392,7 @@ public class PendingUpdatesIndicatorTests : BunitContext
}
}
/// <summary>Verifies that polling starts once an asynchronous authentication resolve completes.</summary>
[Fact]
public void Polling_StartsAfterAnAsynchronousAuthResolveCompletes()
{
@@ -408,8 +431,11 @@ public class PendingUpdatesIndicatorTests : BunitContext
{
private readonly Task<AuthenticationState> _state;
/// <summary>Initializes a new instance of the <c>DeferredAuthStateProvider</c> class.</summary>
/// <param name="state">The authentication state the provider returns.</param>
public DeferredAuthStateProvider(Task<AuthenticationState> state) => _state = state;
/// <inheritdoc />
public override Task<AuthenticationState> GetAuthenticationStateAsync() => _state;
}
}