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,9 +6,10 @@ namespace ZB.MOM.WW.ScadaBridge.TemplateEngine.Tests;
public class CollisionDetectorTests
{
// ========================================================================
// WP-12: Naming Collision Detection
// Naming Collision Detection
// ========================================================================
/// <summary>Verifies that no collisions returns an empty result.</summary>
[Fact]
public void DetectCollisions_NoCollisions_ReturnsEmpty()
{
@@ -22,6 +23,7 @@ public class CollisionDetectorTests
Assert.Empty(collisions);
}
/// <summary>Verifies that different modules with no prefix collision return an empty result.</summary>
[Fact]
public void DetectCollisions_DifferentModulesNoPrefixCollision_ReturnsEmpty()
{
@@ -43,6 +45,7 @@ public class CollisionDetectorTests
Assert.Empty(collisions);
}
/// <summary>Verifies that a collision between a direct and a composed name is reported.</summary>
[Fact]
public void DetectCollisions_DirectAndComposedNameCollision_ReturnsCollision()
{
@@ -67,6 +70,7 @@ public class CollisionDetectorTests
Assert.Contains(collisions, c => c.Contains("modA.Value"));
}
/// <summary>Verifies that nested composition yields the correct canonical names.</summary>
[Fact]
public void DetectCollisions_NestedComposition_ReturnsCorrectCanonicalNames()
{
@@ -89,6 +93,7 @@ public class CollisionDetectorTests
Assert.Empty(collisions);
}
/// <summary>Verifies that inherited members that collide with composed members are reported as a collision.</summary>
[Fact]
public void DetectCollisions_InheritedMembersCollideWithComposed_ReturnsCollision()
{
@@ -113,13 +118,14 @@ public class CollisionDetectorTests
}
// ========================================================================
// Follow-up #3: inherited placeholder rows must not self-collide with the
// Inherited placeholder rows must not self-collide with the
// parent rows the inheritance walk re-adds. Before the fix, every derived
// template reported a collision for each IsInherited row (child origin vs
// "parent 'X'" origin) — so there was no supported path to add an attribute
// or composition to a derived template.
// ========================================================================
/// <summary>Verifies that a derived template with inherited placeholder rows produces no false collision.</summary>
[Fact]
public void DetectCollisions_DerivedTemplateWithInheritedPlaceholders_NoFalseCollision()
{
@@ -142,6 +148,7 @@ public class CollisionDetectorTests
Assert.Empty(collisions);
}
/// <summary>Verifies that multi-level inherited placeholder rows produce no false collision.</summary>
[Fact]
public void DetectCollisions_MultiLevelInheritedPlaceholders_NoFalseCollision()
{
@@ -163,6 +170,7 @@ public class CollisionDetectorTests
Assert.Empty(collisions);
}
/// <summary>Verifies that a genuine collision on a derived template is still detected despite an inherited placeholder.</summary>
[Fact]
public void DetectCollisions_DerivedTemplate_GenuineCollisionStillDetected_DespiteInheritedPlaceholder()
{
@@ -190,7 +198,7 @@ public class CollisionDetectorTests
}
// ========================================================================
// Task 10: repeated composition blindness. A template composed into TWO
// Repeated composition blindness. A template composed into TWO
// different slots was added to the global visited-set on the first slot, so
// the SECOND slot's subtree was never collected — the detector went blind to
// any collision reachable only through the second slot. The visited-set must
@@ -198,6 +206,7 @@ public class CollisionDetectorTests
// siblings/other slots can re-descend the same template.
// ========================================================================
/// <summary>Verifies that a template composed twice within a subtree reports the collision under the second slot.</summary>
[Fact]
public void DetectCollisions_TemplateComposedTwiceWithinSubtree_SeesCollisionUnderSecondSlot()
{
@@ -230,6 +239,7 @@ public class CollisionDetectorTests
Assert.Contains(collisions, c => c.Contains("w.y2.z.Val"));
}
/// <summary>Verifies that a cyclic composition does not loop forever.</summary>
[Fact]
public void DetectCollisions_CyclicComposition_DoesNotLoopForever()
{