docs: backfill XML documentation across 756 files
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public members surfaced by commentchecker — resolves 5,847 of 5,869 issues (99.6%) across three /fixdocs passes.
This commit is contained in:
+31
-1
@@ -12,6 +12,7 @@ public sealed class SnapshotFormatterTests
|
||||
private static readonly DateTime FixedTime =
|
||||
new(2026, 4, 21, 12, 34, 56, 789, DateTimeKind.Utc);
|
||||
|
||||
/// <summary>Verifies that Format includes tag value, status, and both timestamps.</summary>
|
||||
[Fact]
|
||||
public void Format_includes_tag_value_status_and_both_timestamps()
|
||||
{
|
||||
@@ -25,6 +26,9 @@ public sealed class SnapshotFormatterTests
|
||||
output.ShouldContain("Server Time: 2026-04-21T12:34:56.789Z");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatStatus names well-known status codes.</summary>
|
||||
/// <param name="status">The OPC UA status code to format.</param>
|
||||
/// <param name="expectedName">The expected name for the status code.</param>
|
||||
[Theory]
|
||||
// Numeric codes are the canonical OPC Foundation Opc.Ua.StatusCodes values.
|
||||
[InlineData(0x00000000u, "Good")]
|
||||
@@ -49,6 +53,9 @@ public sealed class SnapshotFormatterTests
|
||||
SnapshotFormatter.FormatStatus(status).ShouldBe($"0x{status:X8} ({expectedName})");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatStatus does not apply pre-fix wrong names.</summary>
|
||||
/// <param name="status">The OPC UA status code to format.</param>
|
||||
/// <param name="wrongName">The incorrect name that must not appear in the output.</param>
|
||||
[Theory]
|
||||
// Regression for Driver.Cli.Common-001: these codes were previously mapped to the
|
||||
// wrong names. The hex values below are what the buggy shortlist used; they must
|
||||
@@ -66,6 +73,7 @@ public sealed class SnapshotFormatterTests
|
||||
SnapshotFormatter.FormatStatus(status).ShouldNotContain(wrongName);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatStatus unknown codes fall back to severity class.</summary>
|
||||
[Fact]
|
||||
public void FormatStatus_unknown_codes_fall_back_to_severity_class()
|
||||
{
|
||||
@@ -74,6 +82,7 @@ public sealed class SnapshotFormatterTests
|
||||
SnapshotFormatter.FormatStatus(0xDEADBEEFu).ShouldBe("0xDEADBEEF (Bad)");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatValue renders null as a placeholder.</summary>
|
||||
[Fact]
|
||||
public void FormatValue_renders_null_as_placeholder()
|
||||
{
|
||||
@@ -83,6 +92,7 @@ public sealed class SnapshotFormatterTests
|
||||
output.ShouldContain("Source Time: -"); // null timestamp → dash
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatValue formats booleans as lowercase.</summary>
|
||||
[Fact]
|
||||
public void FormatValue_formats_booleans_lowercase()
|
||||
{
|
||||
@@ -90,6 +100,7 @@ public sealed class SnapshotFormatterTests
|
||||
SnapshotFormatter.Format("Coil", snap).ShouldContain("Value: true");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatValue formats floats using invariant culture.</summary>
|
||||
[Fact]
|
||||
public void FormatValue_formats_floats_invariant_culture()
|
||||
{
|
||||
@@ -99,6 +110,7 @@ public sealed class SnapshotFormatterTests
|
||||
SnapshotFormatter.Format("F8:0", snap).ShouldContain("3.14");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatValue quotes strings.</summary>
|
||||
[Fact]
|
||||
public void FormatValue_quotes_strings()
|
||||
{
|
||||
@@ -106,6 +118,7 @@ public sealed class SnapshotFormatterTests
|
||||
SnapshotFormatter.Format("Msg", snap).ShouldContain("\"hello\"");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatWrite shows status with tag name.</summary>
|
||||
[Fact]
|
||||
public void FormatWrite_shows_status_with_tag_name()
|
||||
{
|
||||
@@ -114,6 +127,7 @@ public sealed class SnapshotFormatterTests
|
||||
.ShouldBe("Write Scratch: 0x00000000 (Good)");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatTable aligns columns and includes header separator.</summary>
|
||||
[Fact]
|
||||
public void FormatTable_aligns_columns_and_includes_header_separator()
|
||||
{
|
||||
@@ -134,6 +148,7 @@ public sealed class SnapshotFormatterTests
|
||||
table.ShouldContain("0x00000000");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatTable rejects mismatched lengths.</summary>
|
||||
[Fact]
|
||||
public void FormatTable_rejects_mismatched_lengths()
|
||||
{
|
||||
@@ -142,6 +157,7 @@ public sealed class SnapshotFormatterTests
|
||||
new[] { new DataValueSnapshot(1, 0u, FixedTime, FixedTime) }));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatTimestamp normalises local kind to UTC.</summary>
|
||||
[Fact]
|
||||
public void FormatTimestamp_normalises_local_kind_to_utc()
|
||||
{
|
||||
@@ -154,6 +170,9 @@ public sealed class SnapshotFormatterTests
|
||||
|
||||
// --- Driver.Cli.Common-002: sub-code bits in status codes ---
|
||||
|
||||
/// <summary>Verifies that FormatStatus with sub-code bits resolves to named class.</summary>
|
||||
/// <param name="statusCode">The OPC UA status code with sub-code bits.</param>
|
||||
/// <param name="expectedName">The expected class name.</param>
|
||||
[Theory]
|
||||
// Status codes with non-zero low-word flag bits must still resolve to the named
|
||||
// high-word class (Driver.Cli.Common-002).
|
||||
@@ -166,6 +185,9 @@ public sealed class SnapshotFormatterTests
|
||||
SnapshotFormatter.FormatStatus(statusCode).ShouldContain($"({expectedName})");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FormatStatus unknown sub-code falls back to severity class.</summary>
|
||||
/// <param name="statusCode">The OPC UA status code with unknown sub-code.</param>
|
||||
/// <param name="expectedSeverity">The expected severity class name.</param>
|
||||
[Theory]
|
||||
// Unknown sub-codes fall back to the severity class (Good / Uncertain / Bad).
|
||||
[InlineData(0x80990000u, "Bad")] // Unknown bad sub-code → "Bad"
|
||||
@@ -179,6 +201,7 @@ public sealed class SnapshotFormatterTests
|
||||
|
||||
// --- FormatTable empty-input ---
|
||||
|
||||
/// <summary>Verifies that FormatTable with empty input returns header only.</summary>
|
||||
[Fact]
|
||||
public void FormatTable_with_empty_input_returns_header_only()
|
||||
{
|
||||
@@ -205,15 +228,19 @@ public sealed class DriverCommandBaseTests
|
||||
[CliFx.Attributes.Command("test-stub", Description = "Test stub — not a real command.")]
|
||||
private sealed class TestCommand : DriverCommandBase
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(1);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ValueTask ExecuteAsync(IConsole console) => default;
|
||||
|
||||
// Expose protected methods for testing.
|
||||
/// <summary>Exposes ConfigureLogging for testing.</summary>
|
||||
public void InvokeConfigureLogging() => ConfigureLogging();
|
||||
/// <summary>Exposes FlushLogging for testing.</summary>
|
||||
public static void InvokeFlushLogging() => FlushLogging();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ConfigureLogging non-verbose sets warning level.</summary>
|
||||
[Fact]
|
||||
public void ConfigureLogging_non_verbose_sets_warning_level()
|
||||
{
|
||||
@@ -226,6 +253,7 @@ public sealed class DriverCommandBaseTests
|
||||
DriverCommandBase_TestCommand_Teardown();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ConfigureLogging verbose sets debug level.</summary>
|
||||
[Fact]
|
||||
public void ConfigureLogging_verbose_sets_debug_level()
|
||||
{
|
||||
@@ -236,6 +264,7 @@ public sealed class DriverCommandBaseTests
|
||||
DriverCommandBase_TestCommand_Teardown();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ConfigureLogging is idempotent and second call is noop.</summary>
|
||||
[Fact]
|
||||
public void ConfigureLogging_is_idempotent_second_call_is_noop()
|
||||
{
|
||||
@@ -252,6 +281,7 @@ public sealed class DriverCommandBaseTests
|
||||
DriverCommandBase_TestCommand_Teardown();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that FlushLogging does not throw.</summary>
|
||||
[Fact]
|
||||
public void FlushLogging_does_not_throw()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user