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:
+4
@@ -16,6 +16,8 @@ public sealed class CommandDisposalConventionsTests
|
||||
{
|
||||
private static readonly string CommandsDir = LocateCommandsDir();
|
||||
|
||||
/// <summary>Verifies that a command does not explicitly call ShutdownAsync (relying on DisposeAsync instead).</summary>
|
||||
/// <param name="commandFile">The command source file name to inspect.</param>
|
||||
[Theory]
|
||||
[InlineData("ProbeCommand.cs")]
|
||||
[InlineData("ReadCommand.cs")]
|
||||
@@ -33,6 +35,8 @@ public sealed class CommandDisposalConventionsTests
|
||||
source.ShouldNotContain("driver.ShutdownAsync(");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a command uses await using for FocasDriver disposal.</summary>
|
||||
/// <param name="commandFile">The command source file name to inspect.</param>
|
||||
[Theory]
|
||||
[InlineData("ProbeCommand.cs")]
|
||||
[InlineData("ReadCommand.cs")]
|
||||
|
||||
+8
@@ -18,10 +18,15 @@ public sealed class FocasCommandBaseBuildOptionsTests
|
||||
[Command("noop-test", Description = "Test-only probe of FocasCommandBase.BuildOptions.")]
|
||||
private sealed class ProbeOnly : FocasCommandBase
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override ValueTask ExecuteAsync(IConsole console) => default;
|
||||
/// <summary>Invokes the BuildOptions method with the given tags.</summary>
|
||||
/// <param name="tags">The list of tag definitions.</param>
|
||||
/// <returns>The built driver options.</returns>
|
||||
public FocasDriverOptions Invoke(IReadOnlyList<FocasTagDefinition> tags) => BuildOptions(tags);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that BuildOptions disables probe for one-shot CLI runs.</summary>
|
||||
[Fact]
|
||||
public void BuildOptions_disables_probe_for_one_shot_cli_runs()
|
||||
{
|
||||
@@ -39,6 +44,7 @@ public sealed class FocasCommandBaseBuildOptionsTests
|
||||
options.Probe.Enabled.ShouldBeFalse();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that BuildOptions maps TimeoutMs to Timeout TimeSpan.</summary>
|
||||
[Fact]
|
||||
public void BuildOptions_maps_TimeoutMs_to_Timeout_TimeSpan()
|
||||
{
|
||||
@@ -49,6 +55,7 @@ public sealed class FocasCommandBaseBuildOptionsTests
|
||||
options.Timeout.ShouldBe(TimeSpan.FromMilliseconds(7500));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that BuildOptions flows host, port, and series through.</summary>
|
||||
[Fact]
|
||||
public void BuildOptions_flows_host_port_series_through()
|
||||
{
|
||||
@@ -67,6 +74,7 @@ public sealed class FocasCommandBaseBuildOptionsTests
|
||||
options.Devices[0].Series.ShouldBe(FocasCncSeries.Zero_i_F);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that BuildOptions forwards tag list verbatim.</summary>
|
||||
[Fact]
|
||||
public void BuildOptions_forwards_tag_list_verbatim()
|
||||
{
|
||||
|
||||
+13
@@ -22,14 +22,20 @@ public sealed class FocasCommandBaseValidationTests
|
||||
[Command("noop-test", Description = "Test-only probe of FocasCommandBase.ValidateOptions.")]
|
||||
private sealed class Probe : FocasCommandBase
|
||||
{
|
||||
/// <summary>Gets or sets the interval in milliseconds.</summary>
|
||||
public int IntervalMs { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ValueTask ExecuteAsync(IConsole console) => default;
|
||||
|
||||
/// <summary>Invokes option validation with interval.</summary>
|
||||
public void InvokeValidate() => ValidateOptions(IntervalMs);
|
||||
|
||||
/// <summary>Invokes option validation without interval.</summary>
|
||||
public void InvokeValidateNoInterval() => ValidateOptions(intervalMs: null);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that default options are accepted.</summary>
|
||||
[Fact]
|
||||
public void Validate_accepts_default_options()
|
||||
{
|
||||
@@ -37,6 +43,8 @@ public sealed class FocasCommandBaseValidationTests
|
||||
Should.NotThrow(() => sut.InvokeValidate());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that out-of-range CNC port is rejected.</summary>
|
||||
/// <param name="port">The port value to test.</param>
|
||||
[Theory]
|
||||
[InlineData(0)]
|
||||
[InlineData(-1)]
|
||||
@@ -48,6 +56,8 @@ public sealed class FocasCommandBaseValidationTests
|
||||
ex.Message.ShouldContain("cnc-port", Case.Insensitive);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that non-positive timeout is rejected.</summary>
|
||||
/// <param name="timeoutMs">The timeout value in milliseconds to test.</param>
|
||||
[Theory]
|
||||
[InlineData(0)]
|
||||
[InlineData(-100)]
|
||||
@@ -58,6 +68,8 @@ public sealed class FocasCommandBaseValidationTests
|
||||
ex.Message.ShouldContain("timeout-ms", Case.Insensitive);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that non-positive interval is rejected.</summary>
|
||||
/// <param name="intervalMs">The interval value in milliseconds to test.</param>
|
||||
[Theory]
|
||||
[InlineData(0)]
|
||||
[InlineData(-500)]
|
||||
@@ -68,6 +80,7 @@ public sealed class FocasCommandBaseValidationTests
|
||||
ex.Message.ShouldContain("interval-ms", Case.Insensitive);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that interval check is skipped when command omits it.</summary>
|
||||
[Fact]
|
||||
public void Validate_skips_interval_check_when_command_omits_it()
|
||||
{
|
||||
|
||||
+2
@@ -30,6 +30,7 @@ public sealed class SubscribeCommandConsoleHandlerTests
|
||||
"Commands", "SubscribeCommand.cs"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that SubscribeCommand documents why OnDataChange uses synchronous console output.</summary>
|
||||
[Fact]
|
||||
public void SubscribeCommand_explains_why_OnDataChange_uses_console_Output_synchronously()
|
||||
{
|
||||
@@ -41,6 +42,7 @@ public sealed class SubscribeCommandConsoleHandlerTests
|
||||
source.ShouldContain("IConsole");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that SubscribeCommand serializes console writes with a lock.</summary>
|
||||
[Fact]
|
||||
public void SubscribeCommand_serialises_console_writes_with_a_lock()
|
||||
{
|
||||
|
||||
+21
@@ -14,6 +14,9 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Cli.Tests;
|
||||
[Trait("Category", "Unit")]
|
||||
public sealed class WriteCommandParseValueTests
|
||||
{
|
||||
/// <summary>Verifies that ParseValue accepts common boolean aliases for Bit type.</summary>
|
||||
/// <param name="raw">The raw string input to parse.</param>
|
||||
/// <param name="expected">The expected boolean result.</param>
|
||||
[Theory]
|
||||
[InlineData("true", true)]
|
||||
[InlineData("0", false)]
|
||||
@@ -24,6 +27,7 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue(raw, FocasDataType.Bit).ShouldBe(expected);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue rejects garbage Bit input as CommandException.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Bit_rejects_garbage_as_CommandException()
|
||||
{
|
||||
@@ -31,6 +35,7 @@ public sealed class WriteCommandParseValueTests
|
||||
() => WriteCommand.ParseValue("maybe", FocasDataType.Bit));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue accepts signed byte range.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Byte_signed_range()
|
||||
{
|
||||
@@ -39,6 +44,7 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue("127", FocasDataType.Byte).ShouldBe((sbyte)127);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue accepts signed 16-bit range.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Int16_signed_range()
|
||||
{
|
||||
@@ -46,24 +52,28 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue("32767", FocasDataType.Int16).ShouldBe(short.MaxValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue parses negative Int32 values.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Int32_parses_negative()
|
||||
{
|
||||
WriteCommand.ParseValue("-2147483648", FocasDataType.Int32).ShouldBe(int.MinValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue parses Float32 in invariant culture.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Float32_invariant_culture()
|
||||
{
|
||||
WriteCommand.ParseValue("3.14", FocasDataType.Float32).ShouldBe(3.14f);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue preserves Float64 higher precision.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Float64_higher_precision()
|
||||
{
|
||||
WriteCommand.ParseValue("2.718281828", FocasDataType.Float64).ShouldBeOfType<double>();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue passes through string values unchanged.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_String_passthrough()
|
||||
{
|
||||
@@ -74,6 +84,9 @@ public sealed class WriteCommandParseValueTests
|
||||
// one-line CliFx error), NOT a raw FormatException stack trace. Previously the raw
|
||||
// BCL parser exceptions leaked, contradicting how the Bit path already handled bad
|
||||
// boolean input.
|
||||
/// <summary>Verifies that ParseValue throws CommandException for non-numeric input to numeric types.</summary>
|
||||
/// <param name="raw">The non-numeric raw input string.</param>
|
||||
/// <param name="type">The FOCAS data type to attempt parsing into.</param>
|
||||
[Theory]
|
||||
[InlineData("xyz", FocasDataType.Byte)]
|
||||
[InlineData("xyz", FocasDataType.Int16)]
|
||||
@@ -88,6 +101,9 @@ public sealed class WriteCommandParseValueTests
|
||||
}
|
||||
|
||||
// OverflowException from out-of-range input must also surface as CommandException.
|
||||
/// <summary>Verifies that ParseValue throws CommandException for overflow in numeric types.</summary>
|
||||
/// <param name="raw">The out-of-range raw input string.</param>
|
||||
/// <param name="type">The FOCAS data type whose range is exceeded.</param>
|
||||
[Theory]
|
||||
[InlineData("128", FocasDataType.Byte)] // sbyte max + 1
|
||||
[InlineData("-129", FocasDataType.Byte)] // sbyte min - 1
|
||||
@@ -100,6 +116,7 @@ public sealed class WriteCommandParseValueTests
|
||||
() => WriteCommand.ParseValue(raw, type));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue CommandException message names the type and value.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_CommandException_message_names_the_type_and_value()
|
||||
{
|
||||
@@ -109,6 +126,10 @@ public sealed class WriteCommandParseValueTests
|
||||
ex.Message.ShouldContain("Int16");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that SynthesiseTagName preserves FOCAS address verbatim.</summary>
|
||||
/// <param name="address">The FOCAS address string.</param>
|
||||
/// <param name="type">The FOCAS data type appended to the tag name.</param>
|
||||
/// <param name="expected">The expected synthesised tag name.</param>
|
||||
[Theory]
|
||||
[InlineData("R100", FocasDataType.Int16, "R100:Int16")]
|
||||
[InlineData("X0.0", FocasDataType.Bit, "X0.0:Bit")]
|
||||
|
||||
Reference in New Issue
Block a user