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:
@@ -4,10 +4,11 @@ using ZB.MOM.WW.ScadaBridge.DataConnectionLayer.Adapters;
|
||||
namespace ZB.MOM.WW.ScadaBridge.DataConnectionLayer.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// WP-34: Tests for protocol extensibility via DataConnectionFactory.
|
||||
/// Tests for protocol extensibility via DataConnectionFactory.
|
||||
/// </summary>
|
||||
public class DataConnectionFactoryTests
|
||||
{
|
||||
/// <summary>Verifies that creating an OPC UA connection returns the OPC UA adapter.</summary>
|
||||
[Fact]
|
||||
public void Create_OpcUa_ReturnsOpcUaAdapter()
|
||||
{
|
||||
@@ -18,6 +19,7 @@ public class DataConnectionFactoryTests
|
||||
Assert.IsType<OpcUaDataConnection>(connection);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that creating an MxGateway connection returns the MxGateway adapter.</summary>
|
||||
[Fact]
|
||||
public void Create_MxGateway_ReturnsMxGatewayAdapter()
|
||||
{
|
||||
@@ -28,6 +30,7 @@ public class DataConnectionFactoryTests
|
||||
Assert.IsType<MxGatewayDataConnection>(connection);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that protocol names are matched case-insensitively.</summary>
|
||||
[Fact]
|
||||
public void Create_CaseInsensitive()
|
||||
{
|
||||
@@ -38,6 +41,7 @@ public class DataConnectionFactoryTests
|
||||
Assert.IsType<OpcUaDataConnection>(connection);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an unknown protocol throws an exception.</summary>
|
||||
[Fact]
|
||||
public void Create_UnknownProtocol_Throws()
|
||||
{
|
||||
@@ -50,12 +54,13 @@ public class DataConnectionFactoryTests
|
||||
Assert.Contains("OpcUa", ex.Message);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a registered adapter extends the set of protocols the factory can create.</summary>
|
||||
[Fact]
|
||||
public void RegisterAdapter_ExtendsFactory()
|
||||
{
|
||||
var factory = new DataConnectionFactory(NullLoggerFactory.Instance);
|
||||
|
||||
// WP-34: Adding new protocol = register adapter
|
||||
// Adding a new protocol = register an adapter
|
||||
factory.RegisterAdapter("Custom", _ => new OpcUaDataConnection(
|
||||
new DefaultOpcUaClientFactory(), NullLogger<OpcUaDataConnection>.Instance));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user