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
@@ -26,7 +26,7 @@ using ZB.MOM.WW.ScadaBridge.Commons.Types.Templates;
namespace ZB.MOM.WW.ScadaBridge.Transport.IntegrationTests;
/// <summary>
/// #05-T8 — per-entity <b>structural</b> round-trip guard.
/// Per-entity <b>structural</b> round-trip guard.
/// <para>
/// For every transported entity type, seed a MAXIMALLY populated entity (every
/// writable data property set to a non-default value), export it through the real
@@ -78,6 +78,7 @@ public sealed class RoundTripEquivalenceTests : IDisposable
{
private readonly ServiceProvider _provider;
/// <summary>Initializes a new instance of <c>RoundTripEquivalenceTests</c>.</summary>
public RoundTripEquivalenceTests()
{
var services = new ServiceCollection();
@@ -111,6 +112,7 @@ public sealed class RoundTripEquivalenceTests : IDisposable
_provider = services.BuildServiceProvider();
}
/// <summary>Releases the resources held by the test fixture.</summary>
public void Dispose() => _provider.Dispose();
// ──────────────────────────────────────────────────────────────────────
@@ -187,6 +189,8 @@ public sealed class RoundTripEquivalenceTests : IDisposable
// Template + its five child kinds + folders
// ══════════════════════════════════════════════════════════════════════
/// <summary>Verifies that round trip template closure preserves every writable property.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RoundTrip_template_closure_preserves_every_writable_property()
{
@@ -336,6 +340,8 @@ public sealed class RoundTripEquivalenceTests : IDisposable
.Include(t => t.Compositions)
.SingleAsync(t => t.Name == name);
/// <summary>Verifies that round trip template folders preserve hierarchy and sort order.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RoundTrip_template_folders_preserve_hierarchy_and_sort_order()
{
@@ -386,7 +392,7 @@ public sealed class RoundTripEquivalenceTests : IDisposable
AssertRoundTripEqual(srcChild, impChild,
nameof(TemplateFolder.Id), nameof(TemplateFolder.ParentFolderId));
// (RED) HOLE #5 — folder hierarchy is flattened on import Add: the folder
// (RED) Folder hole — folder hierarchy is flattened on import Add: the folder
// Add pass builds `new TemplateFolder(dto.Name) { SortOrder }` and never
// consults the DTO's ParentName, so the child lands parent-less. The
// serializer-level Roundtrip_template_folder_preserves_hierarchy test is
@@ -399,6 +405,8 @@ public sealed class RoundTripEquivalenceTests : IDisposable
// SharedScript
// ══════════════════════════════════════════════════════════════════════
/// <summary>Verifies that round trip shared script preserves every writable property.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RoundTrip_shared_script_preserves_every_writable_property()
{
@@ -440,6 +448,8 @@ public sealed class RoundTripEquivalenceTests : IDisposable
// ExternalSystemDefinition + ExternalSystemMethod
// ══════════════════════════════════════════════════════════════════════
/// <summary>Verifies that round trip external system and method preserve every writable property.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RoundTrip_external_system_and_method_preserve_every_writable_property()
{
@@ -450,7 +460,7 @@ public sealed class RoundTripEquivalenceTests : IDisposable
AuthConfiguration = "{\"apiKey\":\"super-secret\"}", // rides SecretsBlock
MaxRetries = 6,
RetryDelay = TimeSpan.FromSeconds(17),
// arch-review 2026-08-19 P7-1: a default-0 fixture value made this
// A default (zero) fixture value made this
// reflection guard vacuous for TimeoutSeconds (comparing default against
// default survives even a serializer that drops the field entirely) — a
// non-default value makes the guard actually exercise the field.
@@ -495,14 +505,14 @@ public sealed class RoundTripEquivalenceTests : IDisposable
{
var impSys = await ctx.ExternalSystemDefinitions.AsNoTracking().SingleAsync();
// (RED) HOLES #1/#2 — MaxRetries + RetryDelay are dropped on import Add:
// (RED) MaxRetries + RetryDelay are dropped on import Add:
// BuildExternalSystem builds `new ExternalSystemDefinition(name, url, authType)
// { AuthConfiguration }` and never copies the DTO's retry config. The
// serializer-level Roundtrip_external_system_preserves_retry_config test is
// GREEN — the loss is purely in BundleImporter's Add path.
AssertRoundTripEqual(srcSys, impSys, nameof(ExternalSystemDefinition.Id));
// (RED) HOLE #3 — ExternalSystemMethod rows are dropped on import Add:
// (RED) ExternalSystemMethod rows are dropped on import Add:
// only the Overwrite path calls SyncExternalSystemMethodsAsync; the Add path
// carries no methods (the definition entity has no Methods navigation to
// cascade). The serializer-level round-trip carries them; the pipeline loses
@@ -521,6 +531,8 @@ public sealed class RoundTripEquivalenceTests : IDisposable
// DatabaseConnectionDefinition (External-System DB connection)
// ══════════════════════════════════════════════════════════════════════
/// <summary>Verifies that round trip database connection preserves every writable property.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RoundTrip_database_connection_preserves_every_writable_property()
{
@@ -564,6 +576,8 @@ public sealed class RoundTripEquivalenceTests : IDisposable
// NotificationList + NotificationRecipient
// ══════════════════════════════════════════════════════════════════════
/// <summary>Verifies that round trip notification list and recipient preserve every writable property.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RoundTrip_notification_list_and_recipient_preserve_every_writable_property()
{
@@ -609,7 +623,7 @@ public sealed class RoundTripEquivalenceTests : IDisposable
// List scalars (Name, Type) round-trip (GREEN).
AssertRoundTripEqual(srcList, impList, nameof(NotificationList.Id));
// (RED) HOLE #4 — recipients are dropped on EXPORT: the dependency
// (RED) Recipients are dropped on EXPORT: the dependency
// resolver loads each selected list via GetNotificationListByIdAsync, which
// uses FindAsync(id) with NO Include(Recipients), so the exported DTO carries
// an empty Recipients collection and the import adds a recipient-less list.
@@ -629,6 +643,8 @@ public sealed class RoundTripEquivalenceTests : IDisposable
// SmtpConfiguration
// ══════════════════════════════════════════════════════════════════════
/// <summary>Verifies that round trip smtp configuration preserves every writable property.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RoundTrip_smtp_configuration_preserves_every_writable_property()
{
@@ -681,6 +697,8 @@ public sealed class RoundTripEquivalenceTests : IDisposable
// SmsConfiguration
// ══════════════════════════════════════════════════════════════════════
/// <summary>Verifies that round trip sms configuration preserves every writable property.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RoundTrip_sms_configuration_preserves_every_writable_property()
{
@@ -726,6 +744,8 @@ public sealed class RoundTripEquivalenceTests : IDisposable
// ApiMethod
// ══════════════════════════════════════════════════════════════════════
/// <summary>Verifies that round trip api method preserves every writable property.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RoundTrip_api_method_preserves_every_writable_property()
{
@@ -770,6 +790,8 @@ public sealed class RoundTripEquivalenceTests : IDisposable
// Site + DataConnection + Instance + all four instance-child kinds
// ══════════════════════════════════════════════════════════════════════
/// <summary>Verifies that round trip site closure preserves every writable property.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RoundTrip_site_closure_preserves_every_writable_property()
{