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
@@ -7,14 +7,14 @@ using ZB.MOM.WW.Secrets.Ui;
namespace ZB.MOM.WW.ScadaBridge.Host.Tests;
/// <summary>
/// G-6 (Task 7) offline behavioral proof: composing the Secrets.Ui authorization
/// Offline behavioral proof: composing the Secrets.Ui authorization
/// (<c>Configure&lt;AuthorizationOptions&gt;(o =&gt; o.AddSecretsAuthorization())</c>) on top of
/// ScadaBridge's own <see cref="AuthorizationPolicies.AddScadaBridgeAuthorization"/> yields the
/// two named policies <c>secrets:manage</c> + <c>secrets:reveal</c>, and — because ScadaBridge
/// builds identities with <c>RoleClaimType = ZbClaimTypes.Role</c> and the library's admin role is
/// literally <c>"Administrator"</c> — an <c>Administrator</c> principal is authorized for BOTH,
/// while a non-admin / anonymous principal is denied BOTH. This is the offline evidence for the
/// Task-6 "no app-specific policy remap needed" decision, exercised against the real
/// "no app-specific policy remap needed" decision, exercised against the real
/// <see cref="IAuthorizationService"/> rather than mere registration.
/// </summary>
public class SecretsAuthorizationTests
@@ -47,6 +47,8 @@ public class SecretsAuthorizationTests
return new ClaimsPrincipal(identity);
}
/// <summary>Verifies both secrets policies are registered.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task BothSecretsPolicies_AreRegistered()
{
@@ -57,6 +59,8 @@ public class SecretsAuthorizationTests
Assert.NotNull(await policyProvider.GetPolicyAsync(RevealPolicy));
}
/// <summary>Verifies that an administrator is authorized for both manage and reveal.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Administrator_IsAuthorized_ForBothManageAndReveal()
{
@@ -68,6 +72,8 @@ public class SecretsAuthorizationTests
Assert.True((await authService.AuthorizeAsync(admin, RevealPolicy)).Succeeded);
}
/// <summary>Verifies that a non-administrator role is denied both manage and reveal.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task NonAdministratorRole_IsDenied_ForBothManageAndReveal()
{
@@ -79,6 +85,8 @@ public class SecretsAuthorizationTests
Assert.False((await authService.AuthorizeAsync(viewer, RevealPolicy)).Succeeded);
}
/// <summary>Verifies that an anonymous principal is denied both manage and reveal.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task AnonymousPrincipal_IsDenied_ForBothManageAndReveal()
{