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
@@ -14,7 +14,7 @@ using ZB.MOM.WW.ScadaBridge.CentralUI.Auth;
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Auth;
/// <summary>
/// Regression tests for CentralUI-017. <c>POST /auth/logout</c> called
/// Regression tests for the logout CSRF fix. <c>POST /auth/logout</c> called
/// <c>.DisableAntiforgery()</c> and a plain <c>GET /logout</c> route also
/// signed the user out — either could be triggered cross-site to forcibly log
/// a user out. Logout is a state-changing authenticated action and must be
@@ -48,6 +48,7 @@ public class AuthEndpointsCsrfTests
e.RoutePattern.RawText == pattern &&
(e.Metadata.GetMetadata<HttpMethodMetadata>()?.HttpMethods.Contains(method) ?? false));
/// <summary>Verifies that the logout POST route does not disable antiforgery validation.</summary>
[Fact]
public void PostAuthLogout_DoesNotDisableAntiforgery()
{
@@ -63,6 +64,7 @@ public class AuthEndpointsCsrfTests
"POST /auth/logout must keep antiforgery validation enabled.");
}
/// <summary>Verifies that the state-changing GET logout route has been removed.</summary>
[Fact]
public void GetLogout_StateChangingRoute_IsRemoved()
{
@@ -72,6 +74,8 @@ public class AuthEndpointsCsrfTests
Assert.Null(getLogout);
}
/// <summary>Verifies that a login POST with a valid antiforgery token authenticates the user and sets the session cookie.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task PostAuthLogin_ValidTokenAuthenticatesAndSetsCookie()
{
@@ -105,6 +109,8 @@ public class AuthEndpointsCsrfTests
Assert.Contains(context.Response.Headers.SetCookie, value => value!.StartsWith(".AspNetCore.Cookies="));
}
/// <summary>Verifies that a login POST with a missing antiforgery token is rejected before any credential lookup occurs.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task PostAuthLogin_MissingTokenRejectsBeforeCredentialLookup()
{