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:
@@ -11,6 +11,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Forms;
|
||||
|
||||
public class OpcUaEndpointEditorTests : BunitContext
|
||||
{
|
||||
/// <summary>Initializes the bUnit context with no-op endpoint verification and certificate management services.</summary>
|
||||
public OpcUaEndpointEditorTests()
|
||||
{
|
||||
// OpcUaEndpointEditor injects IEndpointVerificationService for its Verify-endpoint
|
||||
@@ -21,6 +22,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Services.AddSingleton<ICertManagementService>(Substitute.For<ICertManagementService>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the editor renders all four section labels.</summary>
|
||||
[Fact]
|
||||
public void Renders_All_Four_Section_Labels()
|
||||
{
|
||||
@@ -35,6 +37,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.Contains("Heartbeat", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that editing a field mutates the configuration instance passed to the editor.</summary>
|
||||
[Fact]
|
||||
public void Binding_MutatesPassedConfigInstance()
|
||||
{
|
||||
@@ -46,6 +49,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.Equal("opc.tcp://new-host:4840", config.EndpointUrl);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that enabling the heartbeat creates the heartbeat sub-object.</summary>
|
||||
[Fact]
|
||||
public void EnableHeartbeat_CreatesSubObject()
|
||||
{
|
||||
@@ -58,6 +62,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.NotNull(config.Heartbeat);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that removing the heartbeat sets the heartbeat sub-object to null.</summary>
|
||||
[Fact]
|
||||
public void RemoveHeartbeat_NullsSubObject()
|
||||
{
|
||||
@@ -72,6 +77,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.Null(config.Heartbeat);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the errors parameter renders red error text beside the affected fields.</summary>
|
||||
[Fact]
|
||||
public void Errors_Parameter_RendersPerFieldRedText()
|
||||
{
|
||||
@@ -85,6 +91,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.Contains("text-danger", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a legacy configuration renders the warning banner.</summary>
|
||||
[Fact]
|
||||
public void IsLegacy_True_RendersWarningBanner()
|
||||
{
|
||||
@@ -98,6 +105,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
|
||||
// ── Layer E: new editor sections ──
|
||||
|
||||
/// <summary>Verifies that the editor renders the authentication section label.</summary>
|
||||
[Fact]
|
||||
public void Renders_Authentication_Section_Label()
|
||||
{
|
||||
@@ -105,6 +113,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.Contains("Authentication", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that enabling authentication creates the user identity sub-object.</summary>
|
||||
[Fact]
|
||||
public void EnableAuthentication_CreatesUserIdentitySubObject()
|
||||
{
|
||||
@@ -118,6 +127,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.Equal(OpcUaUserTokenType.Anonymous, config.UserIdentity!.TokenType);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that removing authentication sets the user identity to null.</summary>
|
||||
[Fact]
|
||||
public void RemoveAuthentication_NullsUserIdentity()
|
||||
{
|
||||
@@ -137,6 +147,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.Null(config.UserIdentity);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the username/password token type renders username and password inputs.</summary>
|
||||
[Fact]
|
||||
public void UsernamePassword_RendersUsernameAndPasswordInputs()
|
||||
{
|
||||
@@ -155,6 +166,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.DoesNotContain(">Certificate path<", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the X.509 certificate token type renders the certificate fields.</summary>
|
||||
[Fact]
|
||||
public void X509Certificate_RendersCertificateFields()
|
||||
{
|
||||
@@ -172,6 +184,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.DoesNotContain(">Username<", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the anonymous token type shows no extra credential fields.</summary>
|
||||
[Fact]
|
||||
public void AnonymousTokenType_ShowsNoExtraFields()
|
||||
{
|
||||
@@ -185,6 +198,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.DoesNotContain(">Certificate path<", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that enabling the deadband creates the deadband sub-object.</summary>
|
||||
[Fact]
|
||||
public void EnableDeadband_CreatesDeadbandSubObject()
|
||||
{
|
||||
@@ -197,6 +211,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.NotNull(config.Deadband);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that removing the deadband sets the deadband sub-object to null.</summary>
|
||||
[Fact]
|
||||
public void RemoveDeadband_NullsDeadband()
|
||||
{
|
||||
@@ -211,6 +226,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.Null(config.Deadband);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the advanced subscription section renders.</summary>
|
||||
[Fact]
|
||||
public void AdvancedSubscription_Section_Renders()
|
||||
{
|
||||
@@ -223,6 +239,7 @@ public class OpcUaEndpointEditorTests : BunitContext
|
||||
Assert.Contains("Timestamps to return", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a user identity error renders under the username field.</summary>
|
||||
[Fact]
|
||||
public void UserIdentityError_RendersPerFieldUnderUsername()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user