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
@@ -6,13 +6,14 @@ using ZB.MOM.WW.ScadaBridge.Commons.Types.Enums;
namespace ZB.MOM.WW.ScadaBridge.Commons.Tests.Debugging;
/// <summary>
/// Flow Debugger outbound-calls plan (2026-09-06) Task 0: the Commons vocabulary — External lane,
/// Flow Debugger outbound-calls plan (2026-09-06): the Commons vocabulary — External lane,
/// the three outbound kinds, Pending/Parked outcomes, the lifecycle row, and additive edge/step shapes.
/// </summary>
public class FlowStepProjectorTests
{
private static readonly DateTimeOffset T0 = new(2026, 9, 6, 12, 0, 0, TimeSpan.Zero);
/// <summary>Verifies that the vocabulary has an External lane, three outbound kinds, and Pending and Parked outcomes.</summary>
[Fact]
public void Vocabulary_HasExternalLane_ThreeOutboundKinds_AndPendingParkedOutcomes()
{
@@ -26,6 +27,7 @@ public class FlowStepProjectorTests
Assert.True(Enum.IsDefined(FlowStepOutcome.Parked));
}
/// <summary>Verifies that a flow step can be constructed without a lifecycle and defaults it to null.</summary>
[Fact]
public void FlowStep_WithoutLifecycle_StillConstructs_AndDefaultsToNull()
{
@@ -39,6 +41,7 @@ public class FlowStepProjectorTests
Assert.Equal("Submitted", withLifecycle.Lifecycle![0].Status);
}
/// <summary>Verifies that the Async and Spawn flags of a flow edge default to false.</summary>
[Fact]
public void FlowEdge_AsyncAndSpawn_DefaultFalse()
{
@@ -51,8 +54,9 @@ public class FlowStepProjectorTests
Assert.True(new FlowEdge(a, b, false, false, Async: false, Spawn: true).Spawn);
}
// ---- Task 1: outbound rows project onto the External lane ---------------------------------
// ---- Outbound rows project onto the External lane ---------------------------------
/// <summary>Verifies that a delivered synchronous API call projects to an Ok API-call step on the External lane with a sync subtitle.</summary>
[Fact]
public void SyncApiCall_Delivered_IsApiCall_External_Ok_SyncSubtitle()
{
@@ -73,6 +77,7 @@ public class FlowStepProjectorTests
Assert.Equal(212, step.DurationMs);
}
/// <summary>Verifies that a cached submit on the database outbound channel projects to a pending database-call step with a cached subtitle.</summary>
[Fact]
public void CachedSubmit_InDbOutbound_IsDbCall_Pending_CachedSubtitle()
{
@@ -87,6 +92,7 @@ public class FlowStepProjectorTests
Assert.Equal("Submitted · cached", step.Subtitle);
}
/// <summary>Verifies that a database write with a rows-affected extra has a subtitle combining the operation and the row count.</summary>
[Fact]
public void DbWrite_WithRowsAffectedExtra_SubtitleIsOpAndRows()
{
@@ -105,6 +111,7 @@ public class FlowStepProjectorTests
Assert.Equal("read · 1 row", FlowStepProjector.Project(read).Subtitle);
}
/// <summary>Verifies that a submitted notification send projects to a pending notify step.</summary>
[Fact]
public void NotifySend_Submitted_IsNotify_Pending()
{
@@ -120,6 +127,9 @@ public class FlowStepProjectorTests
Assert.Equal("Submitted", step.Subtitle);
}
/// <summary>Verifies that each outbound audit status maps to the expected flow step outcome.</summary>
/// <param name="status">The outbound audit status.</param>
/// <param name="expected">The expected flow step outcome.</param>
[Theory]
[InlineData(AuditStatus.Parked, FlowStepOutcome.Parked)]
[InlineData(AuditStatus.Discarded, FlowStepOutcome.Parked)]
@@ -139,6 +149,7 @@ public class FlowStepProjectorTests
Assert.Equal($"{status} · cached", step.Subtitle);
}
/// <summary>Verifies that script-trace outcomes are unchanged, so a failed status stays failed and other statuses are Ok.</summary>
[Fact]
public void ScriptTraceOutcome_Unchanged_FailedStaysFailed_OtherStatusesOk()
{
@@ -150,6 +161,9 @@ public class FlowStepProjectorTests
Assert.Equal(FlowStepOutcome.Failed, FlowStepProjector.Project(failed).Outcome);
}
/// <summary>Verifies that building a database subtitle never throws on odd extra values and yields the expected text.</summary>
/// <param name="extra">The extra payload of the audit row.</param>
/// <param name="expected">The expected subtitle.</param>
[Theory]
[InlineData("{\"op\":\"write\",\"rowsAffected\":2147483648}", "write")]
[InlineData("{\"op\":\"write\",\"rowsAffected\":1.5}", "write")]
@@ -163,6 +177,7 @@ public class FlowStepProjectorTests
Assert.Equal(expected, FlowStepProjector.Project(evt).Subtitle);
}
/// <summary>Verifies that projection carries the audit row's correlation id onto the step.</summary>
[Fact]
public void Project_CarriesTheAuditRowsCorrelationId()
{
@@ -173,6 +188,7 @@ public class FlowStepProjectorTests
Assert.Equal(corr, FlowStepProjector.Project(evt).CorrelationId);
}
/// <summary>Verifies that a null correlation id on the audit row leaves the step's correlation id null.</summary>
[Fact]
public void Project_NullCorrelation_LeavesCorrelationIdNull()
{