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
@@ -4,7 +4,7 @@ using ZB.MOM.WW.ScadaBridge.DataConnectionLayer.Adapters;
namespace ZB.MOM.WW.ScadaBridge.DataConnectionLayer.Tests.Adapters;
/// <summary>
/// Gitea #14: stored bindings hard-code a namespace <i>index</i>, which is only
/// Stored bindings hard-code a namespace <i>index</i>, which is only
/// meaningful against one server's namespace table. These tests pin the durable
/// <c>nsu=&lt;uri&gt;</c> form and the back-compat of the existing <c>ns=</c> form.
/// </summary>
@@ -32,6 +32,7 @@ public class OpcUaNodeReferenceTests
return t;
}
/// <summary>Verifies that the legacy namespace index form still resolves.</summary>
[Fact]
public void Resolve_IndexForm_StillWorks()
{
@@ -42,6 +43,7 @@ public class OpcUaNodeReferenceTests
Assert.Equal("pymodbus/plc/HR200", nodeId.Identifier);
}
/// <summary>Verifies that the namespace URI form resolves to the server's live namespace index.</summary>
[Fact]
public void Resolve_UriForm_MapsToLiveIndex()
{
@@ -51,6 +53,7 @@ public class OpcUaNodeReferenceTests
Assert.Equal("pymodbus/plc/HR200", nodeId.Identifier);
}
/// <summary>Verifies that the namespace URI form tracks the index across servers with different namespace tables.</summary>
[Fact]
public void Resolve_UriForm_TracksIndexAcrossServers()
{
@@ -68,10 +71,11 @@ public class OpcUaNodeReferenceTests
Assert.Equal(3, moved.NamespaceIndex); // followed the URI, not the index
}
/// <summary>Verifies that the index form silently binds to a different namespace after a server upgrade.</summary>
[Fact]
public void Resolve_IndexForm_SilentlyBindsToTheWrongNamespace_AcrossServerUpgrade()
{
// This is the #14 hazard, pinned as a characterisation test rather than a wish:
// This is the namespace-index hazard, pinned as a characterisation test rather than a wish:
// v2's sole custom namespace and v3's raw namespace BOTH sit at index 2, so a
// v2-era ns=2 binding resolves happily against v3 while meaning something else
// entirely. Nothing in the index form can detect that — which is the whole
@@ -91,6 +95,7 @@ public class OpcUaNodeReferenceTests
Assert.Contains("does not publish", ex.Message);
}
/// <summary>Verifies that resolving an unknown namespace URI throws.</summary>
[Fact]
public void Resolve_UnknownNamespaceUri_Throws()
{
@@ -100,6 +105,7 @@ public class OpcUaNodeReferenceTests
Assert.Contains("NamespaceArray", ex.Message);
}
/// <summary>Verifies that resolving a reference to another server throws.</summary>
[Fact]
public void Resolve_ForeignServerReference_Throws()
{
@@ -109,6 +115,8 @@ public class OpcUaNodeReferenceTests
Assert.Contains("another server", ex.Message);
}
/// <summary>Verifies that an unparseable reference throws.</summary>
/// <param name="reference">The malformed node reference.</param>
[Theory]
[InlineData("")]
[InlineData(" ;;; not a node id")]
@@ -117,6 +125,7 @@ public class OpcUaNodeReferenceTests
Assert.ThrowsAny<ArgumentException>(() => OpcUaNodeReference.Resolve(reference, V3Table()));
}
/// <summary>Verifies that a server namespace is converted to the durable URI form.</summary>
[Fact]
public void ToDurable_ServerNamespace_EmitsUriForm()
{
@@ -127,6 +136,7 @@ public class OpcUaNodeReferenceTests
Assert.Equal($"nsu={RawUri};s=pymodbus/plc/HR200", durable);
}
/// <summary>Verifies that the standard namespace stays in the short form.</summary>
[Fact]
public void ToDurable_StandardNamespace_StaysShort()
{
@@ -136,6 +146,7 @@ public class OpcUaNodeReferenceTests
Assert.Equal("i=85", durable);
}
/// <summary>Verifies that a durable reference round-trips through resolve.</summary>
[Fact]
public void ToDurable_RoundTripsThroughResolve()
{
@@ -151,6 +162,7 @@ public class OpcUaNodeReferenceTests
Assert.Equal("Area/Line/Equip/Speed", resolved.Identifier);
}
/// <summary>Verifies that a URI missing from the namespace table falls back instead of throwing.</summary>
[Fact]
public void ToDurable_UriNotInTable_FallsBackRatherThanThrowing()
{