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,8 +4,8 @@ using ZB.MOM.WW.ScadaBridge.Commons.Messages.Management;
namespace ZB.MOM.WW.ScadaBridge.Commons.Tests.Messages;
/// <summary>
/// Tests for <see cref="ManagementCommandRegistry"/>, including the Commons-004
/// regression: <c>GetCommandName</c> and <c>Resolve</c> must be symmetric — every
/// Tests for <see cref="ManagementCommandRegistry"/>, including the
/// regression where <c>GetCommandName</c> and <c>Resolve</c> must be symmetric — every
/// type for which <c>GetCommandName</c> yields a name must round-trip back to the
/// same type via <c>Resolve</c>.
/// </summary>
@@ -19,6 +19,7 @@ public class ManagementCommandRegistryTests
&& t != typeof(ReadTagValuesCommand)
&& t != typeof(ResolveRolesCommand));
/// <summary>Verifies that every registered command type round-trips through <c>GetCommandName</c> and <c>Resolve</c>.</summary>
[Fact]
public void GetCommandName_Resolve_RoundTrips_ForEveryRegisteredCommand()
{
@@ -30,6 +31,7 @@ public class ManagementCommandRegistryTests
}
}
/// <summary>Verifies that resolving a known command name returns its type.</summary>
[Fact]
public void Resolve_KnownCommand_ReturnsType()
{
@@ -37,12 +39,14 @@ public class ManagementCommandRegistryTests
Assert.Equal(typeof(CreateSiteCommand), type);
}
/// <summary>Verifies that resolving an unknown command name returns null.</summary>
[Fact]
public void Resolve_UnknownCommand_ReturnsNull()
{
Assert.Null(ManagementCommandRegistry.Resolve("NoSuchCommand"));
}
/// <summary>Verifies that resolving a command name is case-insensitive.</summary>
[Fact]
public void Resolve_IsCaseInsensitive()
{
@@ -50,7 +54,7 @@ public class ManagementCommandRegistryTests
}
/// <summary>
/// Commons-004: <c>GetCommandName</c> previously stripped a <c>Command</c> suffix
/// <c>GetCommandName</c> previously stripped a <c>Command</c> suffix
/// from <em>any</em> type, producing names the registry cannot resolve. It must
/// only return a name for a command type the registry actually contains.
/// </summary>
@@ -62,6 +66,7 @@ public class ManagementCommandRegistryTests
() => ManagementCommandRegistry.GetCommandName(typeof(UnregisteredFakeCommand)));
}
/// <summary>Verifies that <c>GetCommandName</c> throws for a type that is not a registered command.</summary>
[Fact]
public void GetCommandName_NonCommandType_Throws()
{
@@ -69,12 +74,14 @@ public class ManagementCommandRegistryTests
() => ManagementCommandRegistry.GetCommandName(typeof(string)));
}
/// <summary>Verifies that <c>GetCommandName</c> returns the command name with the <c>Command</c> suffix stripped.</summary>
[Fact]
public void GetCommandName_RegisteredCommand_ReturnsStrippedName()
{
Assert.Equal("CreateSite", ManagementCommandRegistry.GetCommandName(typeof(CreateSiteCommand)));
}
/// <summary>Verifies that all native alarm source commands are registered.</summary>
[Fact]
public void Resolve_NativeAlarmSourceCommands_AllRegistered()
{
@@ -95,7 +102,7 @@ public class ManagementCommandRegistryTests
}
/// <summary>
/// M9-T32c: the schema-library CRUD commands must auto-register by reflection
/// The schema-library CRUD commands must auto-register by reflection
/// (no manual registry entry) so the HTTP management boundary can route them.
/// </summary>
[Fact]