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:
@@ -18,11 +18,20 @@ public sealed class AbCipCommandBaseTests
|
||||
[CliFx.Attributes.Command("test")]
|
||||
private sealed class TestableCommand : AbCipCommandBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Invokes the protected <see cref="AbCipCommandBase.BuildOptions"/> method.
|
||||
/// </summary>
|
||||
/// <param name="tags">The tags to pass to BuildOptions.</param>
|
||||
/// <returns>The configured driver options.</returns>
|
||||
public AbCipDriverOptions InvokeBuildOptions(IReadOnlyList<AbCipTagDefinition> tags)
|
||||
=> BuildOptions(tags);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the protected <see cref="AbCipCommandBase.DriverInstanceId"/> property.
|
||||
/// </summary>
|
||||
public string InvokeDriverInstanceId => DriverInstanceId;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ValueTask ExecuteAsync(CliFx.Infrastructure.IConsole console)
|
||||
=> ValueTask.CompletedTask;
|
||||
}
|
||||
@@ -34,6 +43,9 @@ public sealed class AbCipCommandBaseTests
|
||||
DataType: AbCipDataType.DInt,
|
||||
Writable: false);
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that BuildOptions disables probe to prevent racing operator reads.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BuildOptions_disables_probe_so_cli_does_not_race_operator_reads()
|
||||
{
|
||||
@@ -49,6 +61,9 @@ public sealed class AbCipCommandBaseTests
|
||||
options.Probe.Enabled.ShouldBeFalse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that BuildOptions disables controller browse.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BuildOptions_disables_controller_browse()
|
||||
{
|
||||
@@ -64,6 +79,9 @@ public sealed class AbCipCommandBaseTests
|
||||
options.EnableControllerBrowse.ShouldBeFalse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that BuildOptions disables alarm projection.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BuildOptions_disables_alarm_projection()
|
||||
{
|
||||
@@ -79,6 +97,9 @@ public sealed class AbCipCommandBaseTests
|
||||
options.EnableAlarmProjection.ShouldBeFalse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that BuildOptions produces one device with gateway family and derived name.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BuildOptions_produces_one_device_with_gateway_family_and_derived_name()
|
||||
{
|
||||
@@ -98,6 +119,9 @@ public sealed class AbCipCommandBaseTests
|
||||
device.DeviceName.ShouldBe("cli-CompactLogix");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that BuildOptions passes the supplied tag list verbatim.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BuildOptions_passes_supplied_tag_list_verbatim()
|
||||
{
|
||||
@@ -116,6 +140,9 @@ public sealed class AbCipCommandBaseTests
|
||||
options.Tags[1].Name.ShouldBe("t2");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that BuildOptions carries TimeoutMs through to Timeout.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BuildOptions_carries_TimeoutMs_through_to_Timeout()
|
||||
{
|
||||
@@ -131,6 +158,9 @@ public sealed class AbCipCommandBaseTests
|
||||
options.Timeout.ShouldBe(TimeSpan.FromMilliseconds(7500));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that DriverInstanceId embeds gateway for log disambiguation.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void DriverInstanceId_embeds_gateway_for_log_disambiguation()
|
||||
{
|
||||
@@ -143,6 +173,9 @@ public sealed class AbCipCommandBaseTests
|
||||
cmd.InvokeDriverInstanceId.ShouldBe("abcip-cli-ab://10.0.0.5/1,0");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that Timeout setter is inert and does not silently swallow assignments.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Timeout_setter_is_inert_and_does_not_silently_swallow_assignments()
|
||||
{
|
||||
@@ -156,6 +189,10 @@ public sealed class AbCipCommandBaseTests
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that Timeout getter throws CommandException when TimeoutMs is non-positive.
|
||||
/// </summary>
|
||||
/// <param name="badMs">A non-positive timeout value to test.</param>
|
||||
[Theory]
|
||||
[InlineData(0)]
|
||||
[InlineData(-1)]
|
||||
@@ -173,6 +210,9 @@ public sealed class AbCipCommandBaseTests
|
||||
ex.Message.ShouldContain("--timeout-ms");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that RejectStructure throws for Structure DataType.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void RejectStructure_throws_for_Structure_DataType()
|
||||
{
|
||||
@@ -181,6 +221,10 @@ public sealed class AbCipCommandBaseTests
|
||||
ex.Message.ShouldContain("Structure");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that RejectStructure passes for atomic data types.
|
||||
/// </summary>
|
||||
/// <param name="type">The atomic data type to test.</param>
|
||||
[Theory]
|
||||
[InlineData(AbCipDataType.DInt)]
|
||||
[InlineData(AbCipDataType.Bool)]
|
||||
|
||||
+4
@@ -12,6 +12,8 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip.Cli.Tests;
|
||||
[Trait("Category", "Unit")]
|
||||
public sealed class SubscribeCommandIntervalTests
|
||||
{
|
||||
/// <summary>Verifies that validate interval rejects non-positive milliseconds.</summary>
|
||||
/// <param name="badMs">A non-positive interval value that should be rejected.</param>
|
||||
[Theory]
|
||||
[InlineData(0)]
|
||||
[InlineData(-1)]
|
||||
@@ -23,6 +25,8 @@ public sealed class SubscribeCommandIntervalTests
|
||||
ex.Message.ShouldContain("--interval-ms");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that validate interval accepts positive milliseconds.</summary>
|
||||
/// <param name="goodMs">A positive interval value that should be accepted.</param>
|
||||
[Theory]
|
||||
[InlineData(1)]
|
||||
[InlineData(250)]
|
||||
|
||||
+21
@@ -11,6 +11,9 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip.Cli.Tests;
|
||||
[Trait("Category", "Unit")]
|
||||
public sealed class WriteCommandParseValueTests
|
||||
{
|
||||
/// <summary>Verifies ParseValue accepts common boolean aliases.</summary>
|
||||
/// <param name="raw">Input string to parse.</param>
|
||||
/// <param name="expected">Expected boolean value.</param>
|
||||
[Theory]
|
||||
[InlineData("true", true)]
|
||||
[InlineData("0", false)]
|
||||
@@ -21,6 +24,7 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue(raw, AbCipDataType.Bool).ShouldBe(expected);
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue rejects invalid boolean input.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Bool_rejects_garbage()
|
||||
{
|
||||
@@ -28,6 +32,7 @@ public sealed class WriteCommandParseValueTests
|
||||
() => WriteCommand.ParseValue("maybe", AbCipDataType.Bool));
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue correctly widens SInt to signed byte.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_SInt_widens_to_sbyte()
|
||||
{
|
||||
@@ -35,12 +40,14 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue("127", AbCipDataType.SInt).ShouldBe((sbyte)127);
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue correctly parses signed 16-bit integers.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Int_signed_16bit()
|
||||
{
|
||||
WriteCommand.ParseValue("-32768", AbCipDataType.Int).ShouldBe((short)-32768);
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue handles DInt and Dt data types as 32-bit integers.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_DInt_and_Dt_both_land_on_int()
|
||||
{
|
||||
@@ -48,12 +55,14 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue("1234567", AbCipDataType.Dt).ShouldBeOfType<int>();
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue correctly parses 64-bit long integers.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_LInt_64bit()
|
||||
{
|
||||
WriteCommand.ParseValue("9223372036854775807", AbCipDataType.LInt).ShouldBe(long.MaxValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue respects unsigned type bounds.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_unsigned_range_respects_bounds()
|
||||
{
|
||||
@@ -62,24 +71,28 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue("4294967295", AbCipDataType.UDInt).ShouldBeOfType<uint>();
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue correctly parses floating-point with invariant culture.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Real_invariant_culture_decimal()
|
||||
{
|
||||
WriteCommand.ParseValue("3.14", AbCipDataType.Real).ShouldBe(3.14f);
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue correctly handles double-precision floating-point.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_LReal_handles_double_precision()
|
||||
{
|
||||
WriteCommand.ParseValue("2.718281828", AbCipDataType.LReal).ShouldBeOfType<double>();
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue passes through string values unchanged.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_String_passthrough()
|
||||
{
|
||||
WriteCommand.ParseValue("hello logix", AbCipDataType.String).ShouldBe("hello logix");
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue throws for non-numeric input on numeric types.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_non_numeric_for_numeric_types_throws_CommandException()
|
||||
{
|
||||
@@ -87,6 +100,7 @@ public sealed class WriteCommandParseValueTests
|
||||
() => WriteCommand.ParseValue("xyz", AbCipDataType.DInt));
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue throws for out-of-range numeric values.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_out_of_range_throws_CommandException()
|
||||
{
|
||||
@@ -95,6 +109,9 @@ public sealed class WriteCommandParseValueTests
|
||||
() => WriteCommand.ParseValue("999", AbCipDataType.SInt));
|
||||
}
|
||||
|
||||
/// <summary>Verifies ParseValue exception messages include the input and data type for context.</summary>
|
||||
/// <param name="raw">Input string to parse.</param>
|
||||
/// <param name="type">Data type to parse into.</param>
|
||||
[Theory]
|
||||
[InlineData("12x", AbCipDataType.Int)]
|
||||
[InlineData("3.14", AbCipDataType.DInt)]
|
||||
@@ -108,6 +125,10 @@ public sealed class WriteCommandParseValueTests
|
||||
ex.Message.ShouldContain(type.ToString());
|
||||
}
|
||||
|
||||
/// <summary>Verifies SynthesiseTagName preserves the tag path verbatim in the output.</summary>
|
||||
/// <param name="path">Tag path.</param>
|
||||
/// <param name="type">Data type.</param>
|
||||
/// <param name="expected">Expected synthesized tag name.</param>
|
||||
[Theory]
|
||||
[InlineData("Motor01_Speed", AbCipDataType.Real, "Motor01_Speed:Real")]
|
||||
[InlineData("Program:Main.Counter", AbCipDataType.DInt, "Program:Main.Counter:DInt")]
|
||||
|
||||
Reference in New Issue
Block a user