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
@@ -25,8 +25,10 @@ public class MxGatewayDataConnectionTests
["ReadTimeoutMs"] = "2000",
};
// ── Task 6: connect / status / Disconnected ──
// ── connect / status / Disconnected ──
/// <summary>Verifies that connecting resolves the options and sets the status to connected.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ConnectAsync_resolves_options_and_sets_status_connected()
{
@@ -42,6 +44,8 @@ public class MxGatewayDataConnectionTests
Assert.Equal(7, fake.ConnectedWith.WriteUserId);
}
/// <summary>Verifies that connecting with a blank client name defaults it to scadabridge.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ConnectAsync_blank_client_name_defaults_to_scadabridge()
{
@@ -55,6 +59,8 @@ public class MxGatewayDataConnectionTests
Assert.Equal("scadabridge", fake.ConnectedWith!.ClientName);
}
/// <summary>Verifies that the Disconnected event fires exactly once when the event loop faults.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Disconnected_fires_exactly_once_when_event_loop_faults()
{
@@ -74,8 +80,10 @@ public class MxGatewayDataConnectionTests
Assert.Equal(ConnectionHealth.Disconnected, adapter.Status);
}
// ── Task 7: subscribe / unsubscribe + event routing ──
// ── subscribe / unsubscribe + event routing ──
/// <summary>Verifies that an update to a subscribed tag invokes the callback with a mapped tag value.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Subscribed_tag_update_invokes_callback_with_mapped_TagValue()
{
@@ -97,6 +105,8 @@ public class MxGatewayDataConnectionTests
Assert.Equal(ts, received.Timestamp);
}
/// <summary>Verifies that unsubscribing stops routing updates to the callback.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task Unsubscribe_stops_routing_updates()
{
@@ -115,8 +125,10 @@ public class MxGatewayDataConnectionTests
Assert.Contains(subId, fake.Unsubscribed);
}
// ── Task 8: read / write + error classification ──
// ── read / write + error classification ──
/// <summary>Verifies that a read maps both success and failure results.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ReadAsync_maps_success_and_failure()
{
@@ -138,6 +150,8 @@ public class MxGatewayDataConnectionTests
Assert.Equal("bad tag", bad.ErrorMessage);
}
/// <summary>Verifies that a batch read returns a dictionary keyed by tag.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task ReadBatchAsync_returns_dictionary_keyed_by_tag()
{
@@ -154,6 +168,8 @@ public class MxGatewayDataConnectionTests
Assert.Equal(3, results["bbb"].Value!.Value);
}
/// <summary>Verifies that a failed write is mapped to an unsuccessful write result.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WriteAsync_maps_failure_to_unsuccessful_WriteResult()
{
@@ -170,8 +186,10 @@ public class MxGatewayDataConnectionTests
Assert.Equal("rejected", r.ErrorMessage);
}
// ── Task 9: WriteBatchAndWait ──
// ── WriteBatchAndWait ──
/// <summary>Verifies that a batch write and wait returns true when the response value matches.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WriteBatchAndWait_returns_true_when_response_matches()
{
@@ -200,6 +218,8 @@ public class MxGatewayDataConnectionTests
Assert.Contains("Flag", writeCalls);
}
/// <summary>Verifies that a batch write and wait returns false on timeout.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WriteBatchAndWait_returns_false_on_timeout()
{
@@ -219,8 +239,10 @@ public class MxGatewayDataConnectionTests
Assert.False(ok);
}
// ── Task 10: browse ──
// ── browse ──
/// <summary>Verifies that browsing children maps the children and the truncated flag.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task BrowseChildrenAsync_maps_children_and_truncated()
{
@@ -245,6 +267,8 @@ public class MxGatewayDataConnectionTests
Assert.Equal(BrowseNodeClass.Variable, result.Children[1].NodeClass);
}
/// <summary>Verifies that browsing children surfaces the attribute data type.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task BrowseChildrenAsync_surfaces_attribute_datatype()
{
@@ -263,6 +287,8 @@ public class MxGatewayDataConnectionTests
Assert.Equal("Double", result.Children[0].DataType);
}
/// <summary>Verifies that browsing children throws when the connection is not established.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task BrowseChildrenAsync_throws_when_not_connected()
{