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:
+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