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
@@ -14,7 +14,7 @@ using System.Text.Json;
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Actors;
/// <summary>
/// Regression tests for SiteRuntime-001: Instance.SetAttribute must route writes
/// Regression tests: Instance.SetAttribute must route writes
/// to the Data Connection Layer for data-sourced attributes instead of persisting
/// a local static override.
/// </summary>
@@ -26,6 +26,7 @@ public class InstanceActorSetAttributeTests : TestKit, IDisposable
private readonly SiteRuntimeOptions _options;
private readonly TestLocalDb _localDb;
/// <summary>Initializes the test class with an actor system and storage.</summary>
public InstanceActorSetAttributeTests()
{
_localDb = TestLocalDb.CreateTemp("instance-setattr-test");
@@ -40,6 +41,7 @@ public class InstanceActorSetAttributeTests : TestKit, IDisposable
_options = new SiteRuntimeOptions();
}
/// <inheritdoc />
void IDisposable.Dispose()
{
// TestKit teardown first, so no in-flight actor can reach a disposed ILocalDb;
@@ -87,6 +89,8 @@ public class InstanceActorSetAttributeTests : TestKit, IDisposable
]
};
/// <summary>Verifies that setting a data-sourced attribute issues a DCL write and does not persist an override.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task SetAttribute_DataSourcedAttribute_IssuesDclWriteAndDoesNotPersistOverride()
{
@@ -114,6 +118,7 @@ public class InstanceActorSetAttributeTests : TestKit, IDisposable
Assert.Empty(overrides);
}
/// <summary>Verifies that setting a data-sourced attribute does not optimistically update memory.</summary>
[Fact]
public void SetAttribute_DataSourcedAttribute_DoesNotOptimisticallyUpdateMemory()
{
@@ -135,6 +140,7 @@ public class InstanceActorSetAttributeTests : TestKit, IDisposable
Assert.Equal("10", get.Value?.ToString());
}
/// <summary>Verifies that a DCL write failure for a data-sourced attribute is returned to the caller.</summary>
[Fact]
public void SetAttribute_DataSourcedAttribute_DclWriteFailure_ReturnedToCaller()
{
@@ -153,6 +159,8 @@ public class InstanceActorSetAttributeTests : TestKit, IDisposable
Assert.Contains("device rejected write", response.ErrorMessage);
}
/// <summary>Verifies that setting a static attribute still persists the override and does not call the DCL.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task SetAttribute_StaticAttribute_StillPersistsOverrideAndDoesNotCallDcl()
{
@@ -182,10 +190,12 @@ public class InstanceActorSetAttributeTests : TestKit, IDisposable
Assert.Equal("Backup", overrides["Label"]);
}
// SiteRuntime-025: SetAttribute on an unknown attribute name must NOT
// SetAttribute on an unknown attribute name must NOT
// pollute the in-memory dictionary, NOT publish a synthetic
// AttributeValueChanged, and NOT persist a durable override row.
/// <summary>Verifies that setting an unknown attribute returns a failure and does not persist an override.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task SetAttribute_UnknownAttribute_ReturnsFailureAndDoesNotPersistOverride()
{