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:
@@ -27,9 +27,16 @@ public sealed class BuildOptionsTests
|
||||
[Command("test-build-options")]
|
||||
private sealed class TestCommand : AbLegacyCommandBase
|
||||
{
|
||||
/// <summary>Builds driver options from the command's configuration and the provided tags.</summary>
|
||||
/// <param name="tags">The tag definitions to include in the options.</param>
|
||||
/// <returns>Configured driver options.</returns>
|
||||
public AbLegacyDriverOptions Build(IReadOnlyList<AbLegacyTagDefinition> tags)
|
||||
=> BuildOptions(tags);
|
||||
|
||||
/// <summary>Not used; this test command is for BuildOptions inspection only.</summary>
|
||||
/// <param name="console">Not used.</param>
|
||||
/// <returns>Not used.</returns>
|
||||
/// <exception cref="NotSupportedException">Always thrown; this method should not be called.</exception>
|
||||
public override System.Threading.Tasks.ValueTask ExecuteAsync(IConsole console)
|
||||
=> throw new NotSupportedException("TestCommand is for BuildOptions inspection only.");
|
||||
}
|
||||
@@ -50,6 +57,7 @@ public sealed class BuildOptionsTests
|
||||
Writable: true),
|
||||
];
|
||||
|
||||
/// <summary>Verifies that probe is disabled for CLI one-shot runs.</summary>
|
||||
[Fact]
|
||||
public void BuildOptions_disables_probe_for_cli_oneshot_runs()
|
||||
{
|
||||
@@ -67,6 +75,7 @@ public sealed class BuildOptionsTests
|
||||
"CLI commands are one-shot; the background probe loop is unwanted overhead.");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that device is populated from gateway and plc-type options.</summary>
|
||||
[Fact]
|
||||
public void BuildOptions_populates_single_device_from_gateway_and_plc_type()
|
||||
{
|
||||
@@ -85,6 +94,7 @@ public sealed class BuildOptionsTests
|
||||
options.Devices[0].DeviceName.ShouldBe("cli-MicroLogix");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that tag list is forwarded verbatim to the options.</summary>
|
||||
[Fact]
|
||||
public void BuildOptions_forwards_tag_list_verbatim()
|
||||
{
|
||||
@@ -100,6 +110,7 @@ public sealed class BuildOptionsTests
|
||||
options.Tags.ShouldBe(SampleTags);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that timeout-ms option is propagated to the driver options.</summary>
|
||||
[Fact]
|
||||
public void BuildOptions_propagates_timeout_ms()
|
||||
{
|
||||
@@ -115,6 +126,7 @@ public sealed class BuildOptionsTests
|
||||
options.Timeout.ShouldBe(TimeSpan.FromMilliseconds(7500));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that empty tag list yields an empty tags collection in options.</summary>
|
||||
[Fact]
|
||||
public void BuildOptions_with_empty_tag_list_yields_empty_tags_collection()
|
||||
{
|
||||
|
||||
@@ -30,6 +30,7 @@ public sealed class CommandMetadataTests
|
||||
|
||||
// ---------- Driver.AbLegacy.Cli-006 — ProbeCommand --type needs short alias 't' ----------
|
||||
|
||||
/// <summary>Verifies that ProbeCommand --type has short alias -t.</summary>
|
||||
[Fact]
|
||||
public void ProbeCommand_type_has_short_alias_t()
|
||||
{
|
||||
@@ -38,6 +39,9 @@ public sealed class CommandMetadataTests
|
||||
attr.ShortName.ShouldBe('t');
|
||||
}
|
||||
|
||||
/// <summary>Verifies that other commands keep the --type short alias as -t.</summary>
|
||||
/// <param name="commandType">The command type to inspect for the --type option.</param>
|
||||
/// <param name="propName">The property name of the --type option on the command.</param>
|
||||
[Theory]
|
||||
[InlineData(typeof(ReadCommand), nameof(ReadCommand.DataType))]
|
||||
[InlineData(typeof(WriteCommand), nameof(WriteCommand.DataType))]
|
||||
@@ -53,6 +57,7 @@ public sealed class CommandMetadataTests
|
||||
|
||||
// ---------- Driver.AbLegacy.Cli-002 — WriteCommand --value help lists full bool alias set ----------
|
||||
|
||||
/// <summary>Verifies that WriteCommand --value help lists the full boolean alias set.</summary>
|
||||
[Fact]
|
||||
public void WriteCommand_value_help_lists_full_boolean_alias_set()
|
||||
{
|
||||
@@ -68,6 +73,7 @@ public sealed class CommandMetadataTests
|
||||
|
||||
// ---------- Driver.AbLegacy.Cli-005 — SubscribeCommand --interval-ms help notes 250ms floor ----------
|
||||
|
||||
/// <summary>Verifies that SubscribeCommand --interval-ms help notes the PollGroupEngine floor.</summary>
|
||||
[Fact]
|
||||
public void SubscribeCommand_interval_ms_help_notes_PollGroupEngine_floor()
|
||||
{
|
||||
|
||||
+19
@@ -11,6 +11,9 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Cli.Tests;
|
||||
[Trait("Category", "Unit")]
|
||||
public sealed class WriteCommandParseValueTests
|
||||
{
|
||||
/// <summary>Verifies that bit values accept common aliases like "true", "yes", "0", and "OFF".</summary>
|
||||
/// <param name="raw">The raw string value to parse.</param>
|
||||
/// <param name="expected">The expected boolean result.</param>
|
||||
[Theory]
|
||||
[InlineData("true", true)]
|
||||
[InlineData("0", false)]
|
||||
@@ -21,6 +24,7 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue(raw, AbLegacyDataType.Bit).ShouldBe(expected);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that signed 16-bit integer values are parsed correctly within range.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Int_signed_16bit()
|
||||
{
|
||||
@@ -28,6 +32,7 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue("32767", AbLegacyDataType.Int).ShouldBe((short)32767);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that AnalogInt values parse using the same semantics as Int.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_AnalogInt_parses_same_as_Int()
|
||||
{
|
||||
@@ -35,6 +40,7 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue("100", AbLegacyDataType.AnalogInt).ShouldBeOfType<short>();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that 32-bit integer values are parsed correctly within range.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Long_32bit()
|
||||
{
|
||||
@@ -42,18 +48,22 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue("2147483647", AbLegacyDataType.Long).ShouldBe(int.MaxValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that float values are parsed using invariant culture.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Float_invariant_culture()
|
||||
{
|
||||
WriteCommand.ParseValue("3.14", AbLegacyDataType.Float).ShouldBe(3.14f);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that string values are returned unchanged.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_String_passthrough()
|
||||
{
|
||||
WriteCommand.ParseValue("hello slc", AbLegacyDataType.String).ShouldBe("hello slc");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Timer, Counter, and Control element types parse as 32-bit integers.</summary>
|
||||
/// <param name="type">The AB Legacy data type to test.</param>
|
||||
[Theory]
|
||||
[InlineData(AbLegacyDataType.TimerElement)]
|
||||
[InlineData(AbLegacyDataType.CounterElement)]
|
||||
@@ -64,6 +74,7 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue("42", type).ShouldBeOfType<int>();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that unknown string values are rejected for bit type.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Bit_rejects_unknown_strings()
|
||||
{
|
||||
@@ -71,6 +82,7 @@ public sealed class WriteCommandParseValueTests
|
||||
() => WriteCommand.ParseValue("perhaps", AbLegacyDataType.Bit));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that non-numeric values throw CommandException for numeric types.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_non_numeric_for_numeric_types_throws_CommandException()
|
||||
{
|
||||
@@ -79,6 +91,9 @@ public sealed class WriteCommandParseValueTests
|
||||
() => WriteCommand.ParseValue("xyz", AbLegacyDataType.Int));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that out-of-range values throw CommandException.</summary>
|
||||
/// <param name="raw">The raw string value that is out of range.</param>
|
||||
/// <param name="type">The AB Legacy data type to test.</param>
|
||||
[Theory]
|
||||
[InlineData("99999", AbLegacyDataType.Int)] // short range is ±32767
|
||||
[InlineData("-99999", AbLegacyDataType.Int)]
|
||||
@@ -90,6 +105,10 @@ public sealed class WriteCommandParseValueTests
|
||||
() => WriteCommand.ParseValue(raw, type));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that PCCC addresses are preserved verbatim in synthesized tag names.</summary>
|
||||
/// <param name="address">The PCCC address string to test.</param>
|
||||
/// <param name="type">The AB Legacy data type.</param>
|
||||
/// <param name="expected">The expected synthesized tag name.</param>
|
||||
[Theory]
|
||||
[InlineData("N7:0", AbLegacyDataType.Int, "N7:0:Int")]
|
||||
[InlineData("B3:0/3", AbLegacyDataType.Bit, "B3:0/3:Bit")]
|
||||
|
||||
Reference in New Issue
Block a user