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:
@@ -8,6 +8,12 @@ public sealed class S7AddressParserTests
|
||||
{
|
||||
// --- Data blocks ---
|
||||
|
||||
/// <summary>Verifies that data block addresses are parsed correctly.</summary>
|
||||
/// <param name="input">The address string to parse.</param>
|
||||
/// <param name="db">The expected data block number.</param>
|
||||
/// <param name="size">The expected data size.</param>
|
||||
/// <param name="byteOff">The expected byte offset.</param>
|
||||
/// <param name="bitOff">The expected bit offset.</param>
|
||||
[Theory]
|
||||
[InlineData("DB1.DBX0.0", 1, S7Size.Bit, 0, 0)]
|
||||
[InlineData("DB1.DBX0.7", 1, S7Size.Bit, 0, 7)]
|
||||
@@ -26,6 +32,11 @@ public sealed class S7AddressParserTests
|
||||
r.BitOffset.ShouldBe(bitOff);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that parsing is case-insensitive and trims whitespace.</summary>
|
||||
/// <param name="input">The address string to parse.</param>
|
||||
/// <param name="db">The expected data block number.</param>
|
||||
/// <param name="size">The expected data size.</param>
|
||||
/// <param name="off">The expected byte offset.</param>
|
||||
[Theory]
|
||||
[InlineData("db1.dbw0", 1, S7Size.Word, 0)]
|
||||
[InlineData(" DB1.DBW0 ", 1, S7Size.Word, 0)] // trim whitespace
|
||||
@@ -40,6 +51,12 @@ public sealed class S7AddressParserTests
|
||||
|
||||
// --- M / I / Q ---
|
||||
|
||||
/// <summary>Verifies that Memory (M), Input (I), and Output (Q) addresses are parsed correctly.</summary>
|
||||
/// <param name="input">The address string to parse.</param>
|
||||
/// <param name="area">The expected address area.</param>
|
||||
/// <param name="size">The expected data size.</param>
|
||||
/// <param name="byteOff">The expected byte offset.</param>
|
||||
/// <param name="bitOff">The expected bit offset.</param>
|
||||
[Theory]
|
||||
[InlineData("MB0", S7Area.Memory, S7Size.Byte, 0, 0)]
|
||||
[InlineData("MW10", S7Area.Memory, S7Size.Word, 10, 0)]
|
||||
@@ -65,6 +82,10 @@ public sealed class S7AddressParserTests
|
||||
|
||||
// --- Timers / counters ---
|
||||
|
||||
/// <summary>Verifies that timer and counter addresses are parsed correctly.</summary>
|
||||
/// <param name="input">The address string to parse.</param>
|
||||
/// <param name="area">The expected address area.</param>
|
||||
/// <param name="number">The expected timer or counter number.</param>
|
||||
[Theory]
|
||||
[InlineData("T0", S7Area.Timer, 0)]
|
||||
[InlineData("T15", S7Area.Timer, 15)]
|
||||
@@ -80,6 +101,8 @@ public sealed class S7AddressParserTests
|
||||
|
||||
// --- Reject garbage ---
|
||||
|
||||
/// <summary>Verifies that invalid addresses are rejected with FormatException.</summary>
|
||||
/// <param name="bad">The invalid address string to test.</param>
|
||||
[Theory]
|
||||
[InlineData("")]
|
||||
[InlineData(" ")]
|
||||
@@ -102,6 +125,7 @@ public sealed class S7AddressParserTests
|
||||
public void Parse_rejects_invalid(string bad)
|
||||
=> Should.Throw<FormatException>(() => S7AddressParser.Parse(bad));
|
||||
|
||||
/// <summary>Verifies that TryParse returns false for invalid input without throwing.</summary>
|
||||
[Fact]
|
||||
public void TryParse_returns_false_for_garbage_without_throwing()
|
||||
{
|
||||
@@ -109,6 +133,7 @@ public sealed class S7AddressParserTests
|
||||
r.ShouldBe(default);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that TryParse returns true for a valid address.</summary>
|
||||
[Fact]
|
||||
public void TryParse_returns_true_for_valid_address()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user