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:
+10
@@ -22,6 +22,7 @@ public sealed class BrowseCommandFilterTests
|
||||
SecurityClass: cls,
|
||||
IsHistorized: false);
|
||||
|
||||
/// <summary>Verifies that the collector records variables in call order.</summary>
|
||||
[Fact]
|
||||
public void Collector_records_each_variable_in_call_order()
|
||||
{
|
||||
@@ -34,6 +35,7 @@ public sealed class BrowseCommandFilterTests
|
||||
builder.Variables[1].BrowseName.ShouldBe("GVL.B");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that folder returns the same builder for flattening.</summary>
|
||||
[Fact]
|
||||
public void Folder_returns_same_builder_so_nested_variables_land_in_one_flat_list()
|
||||
{
|
||||
@@ -47,6 +49,7 @@ public sealed class BrowseCommandFilterTests
|
||||
builder.Variables[0].BrowseName.ShouldBe("GVL.X");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that empty prefix returns all symbols up to max.</summary>
|
||||
[Fact]
|
||||
public void FilterAndLimit_empty_prefix_returns_everything_up_to_max()
|
||||
{
|
||||
@@ -61,6 +64,7 @@ public sealed class BrowseCommandFilterTests
|
||||
matched.Count.ShouldBe(3);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that prefix filtering is case-sensitive.</summary>
|
||||
[Fact]
|
||||
public void FilterAndLimit_prefix_is_case_sensitive()
|
||||
{
|
||||
@@ -77,6 +81,7 @@ public sealed class BrowseCommandFilterTests
|
||||
matched[0].BrowseName.ShouldBe("GVL_Fixture.x");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that zero max limit means unbounded.</summary>
|
||||
[Fact]
|
||||
public void FilterAndLimit_zero_max_means_unbounded()
|
||||
{
|
||||
@@ -88,24 +93,29 @@ public sealed class BrowseCommandFilterTests
|
||||
limit.ShouldBe(10);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that output is capped to max when more symbols match.</summary>
|
||||
[Fact]
|
||||
public void FilterAndLimit_caps_to_max_when_more_matched()
|
||||
{
|
||||
BrowseCommand.PrintLimit(matchedCount: 1000, max: 50).ShouldBe(50);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that output is not padded when fewer symbols match.</summary>
|
||||
[Fact]
|
||||
public void FilterAndLimit_does_not_pad_to_max_when_fewer_matched()
|
||||
{
|
||||
BrowseCommand.PrintLimit(matchedCount: 3, max: 50).ShouldBe(3);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ViewOnly attribute returns RO access tag.</summary>
|
||||
[Fact]
|
||||
public void AccessTag_returns_RO_for_ViewOnly_attribute()
|
||||
{
|
||||
BrowseCommand.AccessTag(Info(SecurityClassification.ViewOnly)).ShouldBe("RO");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that all classifications except ViewOnly return RW access tag.</summary>
|
||||
/// <param name="cls">The security classification to test.</param>
|
||||
[Theory]
|
||||
[InlineData(SecurityClassification.FreeAccess)]
|
||||
[InlineData(SecurityClassification.Operate)]
|
||||
|
||||
+4
@@ -16,6 +16,8 @@ public sealed class SubscribeCommandMechanismTests
|
||||
{
|
||||
private sealed record StubHandle(string DiagnosticId) : ISubscriptionHandle;
|
||||
|
||||
/// <summary>Verifies that DescribeMechanism returns ADS notification for native handle.</summary>
|
||||
/// <param name="diagId">The diagnostic ID of the subscription handle to classify.</param>
|
||||
[Theory]
|
||||
[InlineData("twincat-native-sub-1")]
|
||||
[InlineData("twincat-native-sub-42")]
|
||||
@@ -25,6 +27,8 @@ public sealed class SubscribeCommandMechanismTests
|
||||
SubscribeCommand.DescribeMechanism(new StubHandle(diagId)).ShouldBe("ADS notification");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that DescribeMechanism returns polling for anything else.</summary>
|
||||
/// <param name="diagId">The diagnostic ID of the subscription handle to classify.</param>
|
||||
[Theory]
|
||||
[InlineData("pollgroup-1")]
|
||||
[InlineData("modbus-poll-7")]
|
||||
|
||||
+17
@@ -15,6 +15,7 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Cli.Tests;
|
||||
[Trait("Category", "Unit")]
|
||||
public sealed class TwinCATCommandBaseTests
|
||||
{
|
||||
/// <summary>Verifies that the gateway string uses canonical ADS scheme with port.</summary>
|
||||
[Fact]
|
||||
public void Gateway_uses_canonical_ads_scheme_with_port()
|
||||
{
|
||||
@@ -27,6 +28,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
cmd.GatewayForTest.ShouldBe("ads://192.168.1.40.1.1:851");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the gateway string round-trips through TwinCATAmsAddress.TryParse.</summary>
|
||||
[Fact]
|
||||
public void Gateway_round_trips_through_TwinCATAmsAddress_TryParse()
|
||||
{
|
||||
@@ -45,6 +47,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
parsed.Port.ShouldBe(852);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the driver instance ID includes the AMS target.</summary>
|
||||
[Fact]
|
||||
public void DriverInstanceId_includes_ams_target()
|
||||
{
|
||||
@@ -57,6 +60,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
cmd.DriverInstanceIdForTest.ShouldBe("twincat-cli-127.0.0.1.1.1:851");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that timeout is a projection of TimeoutMs and initialization is a no-op.</summary>
|
||||
[Fact]
|
||||
public void Timeout_is_projection_of_TimeoutMs_and_init_is_noop()
|
||||
{
|
||||
@@ -69,6 +73,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
cmd.Timeout.ShouldBe(TimeSpan.FromMilliseconds(7777));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that BuildOptions wires device tags, timeout, and disables probe.</summary>
|
||||
[Fact]
|
||||
public void BuildOptions_wires_device_tags_timeout_and_disables_probe()
|
||||
{
|
||||
@@ -102,6 +107,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
options.UseNativeNotifications.ShouldBeTrue();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the PollOnly flag flips UseNativeNotifications off.</summary>
|
||||
[Fact]
|
||||
public void BuildOptions_PollOnly_flips_UseNativeNotifications_off()
|
||||
{
|
||||
@@ -116,6 +122,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
|
||||
// ---- Driver.TwinCAT.Cli-001 (range validation) ----
|
||||
|
||||
/// <summary>Verifies that validation rejects zero timeout.</summary>
|
||||
[Fact]
|
||||
public void Validate_rejects_zero_timeout()
|
||||
{
|
||||
@@ -129,6 +136,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
ex.Message.ShouldContain("--timeout-ms");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that validation rejects negative timeout.</summary>
|
||||
[Fact]
|
||||
public void Validate_rejects_negative_timeout()
|
||||
{
|
||||
@@ -141,6 +149,8 @@ public sealed class TwinCATCommandBaseTests
|
||||
Should.Throw<CliFx.Exceptions.CommandException>(() => cmd.ValidateForTest());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that validation rejects out-of-range AMS port values.</summary>
|
||||
/// <param name="port">The out-of-range AMS port value to test.</param>
|
||||
[Theory]
|
||||
[InlineData(0)]
|
||||
[InlineData(-1)]
|
||||
@@ -158,6 +168,8 @@ public sealed class TwinCATCommandBaseTests
|
||||
ex.Message.ShouldContain("--ams-port");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that validation accepts in-range AMS port values.</summary>
|
||||
/// <param name="port">The valid AMS port value to test.</param>
|
||||
[Theory]
|
||||
[InlineData(1)]
|
||||
[InlineData(801)]
|
||||
@@ -174,6 +186,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
Should.NotThrow(() => cmd.ValidateForTest());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that SubscribeCommand validation rejects zero interval.</summary>
|
||||
[Fact]
|
||||
public void SubscribeCommand_validate_rejects_zero_interval()
|
||||
{
|
||||
@@ -187,6 +200,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
ex.Message.ShouldContain("--interval-ms");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that SubscribeCommand validation rejects negative interval.</summary>
|
||||
[Fact]
|
||||
public void SubscribeCommand_validate_rejects_negative_interval()
|
||||
{
|
||||
@@ -201,6 +215,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
|
||||
// ---- Driver.TwinCAT.Cli-004 (PollOnly off BrowseCommand surface) ----
|
||||
|
||||
/// <summary>Verifies that BrowseCommand does not expose the poll-only flag.</summary>
|
||||
[Fact]
|
||||
public void BrowseCommand_does_not_expose_poll_only_flag()
|
||||
{
|
||||
@@ -212,6 +227,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
props.ShouldNotContain(p => p.Name == "PollOnly");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ProbeCommand still exposes the poll-only flag.</summary>
|
||||
[Fact]
|
||||
public void ProbeCommand_still_exposes_poll_only_flag()
|
||||
{
|
||||
@@ -224,6 +240,7 @@ public sealed class TwinCATCommandBaseTests
|
||||
|
||||
// ---- Driver.TwinCAT.Cli-005 (probe --type short alias) ----
|
||||
|
||||
/// <summary>Verifies that ProbeCommand type option carries the short alias 't'.</summary>
|
||||
[Fact]
|
||||
public void ProbeCommand_type_option_carries_short_alias_t()
|
||||
{
|
||||
|
||||
+24
@@ -12,6 +12,9 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Cli.Tests;
|
||||
[Trait("Category", "Unit")]
|
||||
public sealed class WriteCommandParseValueTests
|
||||
{
|
||||
/// <summary>Verifies that ParseValue Bool accepts common aliases.</summary>
|
||||
/// <param name="raw">The raw input string to parse.</param>
|
||||
/// <param name="expected">The expected boolean result.</param>
|
||||
[Theory]
|
||||
[InlineData("true", true)]
|
||||
[InlineData("0", false)]
|
||||
@@ -22,6 +25,7 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue(raw, TwinCATDataType.Bool).ShouldBe(expected);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue Bool rejects garbage.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Bool_rejects_garbage()
|
||||
{
|
||||
@@ -29,72 +33,84 @@ public sealed class WriteCommandParseValueTests
|
||||
() => WriteCommand.ParseValue("maybe", TwinCATDataType.Bool));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue SInt parses signed byte.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_SInt_signed_byte()
|
||||
{
|
||||
WriteCommand.ParseValue("-128", TwinCATDataType.SInt).ShouldBe((sbyte)-128);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue USInt parses unsigned byte.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_USInt_unsigned_byte()
|
||||
{
|
||||
WriteCommand.ParseValue("255", TwinCATDataType.USInt).ShouldBe((byte)255);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue Int parses signed 16-bit value.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Int_signed_16bit()
|
||||
{
|
||||
WriteCommand.ParseValue("-32768", TwinCATDataType.Int).ShouldBe((short)-32768);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue UInt parses unsigned 16-bit value.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_UInt_unsigned_16bit()
|
||||
{
|
||||
WriteCommand.ParseValue("65535", TwinCATDataType.UInt).ShouldBe((ushort)65535);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue DInt parses int32 bounds.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_DInt_int32_bounds()
|
||||
{
|
||||
WriteCommand.ParseValue("-2147483648", TwinCATDataType.DInt).ShouldBe(int.MinValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue UDInt parses uint32 maximum.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_UDInt_uint32_max()
|
||||
{
|
||||
WriteCommand.ParseValue("4294967295", TwinCATDataType.UDInt).ShouldBe(uint.MaxValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue LInt parses int64 minimum.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_LInt_int64_min()
|
||||
{
|
||||
WriteCommand.ParseValue("-9223372036854775808", TwinCATDataType.LInt).ShouldBe(long.MinValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue ULInt parses uint64 maximum.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_ULInt_uint64_max()
|
||||
{
|
||||
WriteCommand.ParseValue("18446744073709551615", TwinCATDataType.ULInt).ShouldBe(ulong.MaxValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue Real uses invariant culture.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Real_invariant_culture()
|
||||
{
|
||||
WriteCommand.ParseValue("3.14", TwinCATDataType.Real).ShouldBe(3.14f);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue LReal has higher precision.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_LReal_higher_precision()
|
||||
{
|
||||
WriteCommand.ParseValue("2.718281828", TwinCATDataType.LReal).ShouldBeOfType<double>();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue String passes through input unchanged.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_String_passthrough()
|
||||
{
|
||||
WriteCommand.ParseValue("hallo beckhoff", TwinCATDataType.String).ShouldBe("hallo beckhoff");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue WString passes through input unchanged.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_WString_passthrough()
|
||||
{
|
||||
@@ -103,6 +119,8 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue("überstall", TwinCATDataType.WString).ShouldBe("überstall");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue IEC date/time variants land on uint32.</summary>
|
||||
/// <param name="type">The IEC 61131-3 data type to parse.</param>
|
||||
[Theory]
|
||||
[InlineData(TwinCATDataType.Time)]
|
||||
[InlineData(TwinCATDataType.Date)]
|
||||
@@ -115,6 +133,7 @@ public sealed class WriteCommandParseValueTests
|
||||
WriteCommand.ParseValue("1234567", type).ShouldBeOfType<uint>();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue Structure is refused.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_Structure_refused()
|
||||
{
|
||||
@@ -122,6 +141,7 @@ public sealed class WriteCommandParseValueTests
|
||||
() => WriteCommand.ParseValue("42", TwinCATDataType.Structure));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ParseValue non-numeric for numeric types throws.</summary>
|
||||
[Fact]
|
||||
public void ParseValue_non_numeric_for_numeric_types_throws()
|
||||
{
|
||||
@@ -129,6 +149,10 @@ public sealed class WriteCommandParseValueTests
|
||||
() => WriteCommand.ParseValue("xyz", TwinCATDataType.DInt));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that SynthesiseTagName preserves symbolic path verbatim.</summary>
|
||||
/// <param name="symbol">The symbolic path to synthesise.</param>
|
||||
/// <param name="type">The TwinCAT data type.</param>
|
||||
/// <param name="expected">The expected synthesised tag name.</param>
|
||||
[Theory]
|
||||
[InlineData("MAIN.bStart", TwinCATDataType.Bool, "MAIN.bStart:Bool")]
|
||||
[InlineData("GVL.Counter", TwinCATDataType.DInt, "GVL.Counter:DInt")]
|
||||
|
||||
Reference in New Issue
Block a user