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
@@ -3,12 +3,15 @@ using System.Net;
namespace ZB.MOM.WW.ScadaBridge.ExternalSystemGateway.Tests;
/// <summary>
/// WP-8: Tests for HTTP error classification.
/// Tests for HTTP error classification.
/// Transient: connection refused, timeout, HTTP 408/429/5xx.
/// Permanent: HTTP 4xx (except 408/429).
/// </summary>
public class ErrorClassifierTests
{
/// <summary>Verifies that transient HTTP status codes are classified as transient.</summary>
/// <param name="statusCode">The test input.</param>
/// <param name="expectedTransient">The test input.</param>
[Theory]
[InlineData(HttpStatusCode.InternalServerError, true)]
[InlineData(HttpStatusCode.BadGateway, true)]
@@ -21,6 +24,9 @@ public class ErrorClassifierTests
Assert.Equal(expectedTransient, ErrorClassifier.IsTransient(statusCode));
}
/// <summary>Verifies that permanent HTTP status codes are classified as permanent.</summary>
/// <param name="statusCode">The test input.</param>
/// <param name="expectedTransient">The test input.</param>
[Theory]
[InlineData(HttpStatusCode.BadRequest, false)]
[InlineData(HttpStatusCode.Unauthorized, false)]
@@ -33,30 +39,35 @@ public class ErrorClassifierTests
Assert.Equal(expectedTransient, ErrorClassifier.IsTransient(statusCode));
}
/// <summary>Verifies that an HttpRequestException is classified as transient.</summary>
[Fact]
public void HttpRequestException_IsTransient()
{
Assert.True(ErrorClassifier.IsTransient(new HttpRequestException("Connection refused")));
}
/// <summary>Verifies that a TaskCanceledException is classified as transient.</summary>
[Fact]
public void TaskCanceledException_IsTransient()
{
Assert.True(ErrorClassifier.IsTransient(new TaskCanceledException("Timeout")));
}
/// <summary>Verifies that a TimeoutException is classified as transient.</summary>
[Fact]
public void TimeoutException_IsTransient()
{
Assert.True(ErrorClassifier.IsTransient(new TimeoutException()));
}
/// <summary>Verifies that a generic exception is not classified as transient.</summary>
[Fact]
public void GenericException_IsNotTransient()
{
Assert.False(ErrorClassifier.IsTransient(new InvalidOperationException("bad input")));
}
/// <summary>Verifies that AsTransient creates the expected exception.</summary>
[Fact]
public void AsTransient_CreatesCorrectException()
{
@@ -65,6 +76,7 @@ public class ErrorClassifierTests
Assert.Equal("test message", ex.Message);
}
/// <summary>Verifies that an OperationCanceledException caused by the caller's cancellation is not classified as transient.</summary>
[Fact]
public void IsTransient_CallerCancelledOce_IsNotTransient()
{