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:
@@ -12,6 +12,7 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests.Runtime;
|
||||
/// </summary>
|
||||
public sealed class MxValueEncoderTests
|
||||
{
|
||||
/// <summary>Verifies that encoding a null value sets the IsNull flag.</summary>
|
||||
[Fact]
|
||||
public void Encode_Null_SetsIsNullFlag()
|
||||
{
|
||||
@@ -19,9 +20,13 @@ public sealed class MxValueEncoderTests
|
||||
v.IsNull.ShouldBeTrue();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that encoding a boolean value encodes correctly.</summary>
|
||||
[Fact]
|
||||
public void Encode_Bool() => MxValueEncoder.Encode(true).BoolValue.ShouldBe(true);
|
||||
|
||||
/// <summary>Verifies that narrow signed and unsigned types fit into Int32 encoding.</summary>
|
||||
/// <param name="input">The input value to encode.</param>
|
||||
/// <param name="expected">The expected encoded integer value.</param>
|
||||
[Theory]
|
||||
[InlineData((sbyte)-5, -5)]
|
||||
[InlineData((short)-1000, -1000)]
|
||||
@@ -34,9 +39,11 @@ public sealed class MxValueEncoderTests
|
||||
v.Int32Value.ShouldBe(expected);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Int32 values round-trip through encoding.</summary>
|
||||
[Fact]
|
||||
public void Encode_Int32_RoundTrip() => MxValueEncoder.Encode(int.MinValue).Int32Value.ShouldBe(int.MinValue);
|
||||
|
||||
/// <summary>Verifies that Int64 values round-trip through encoding.</summary>
|
||||
[Fact]
|
||||
public void Encode_Int64_RoundTrip()
|
||||
{
|
||||
@@ -45,18 +52,23 @@ public sealed class MxValueEncoderTests
|
||||
v.Int64Value.ShouldBe(long.MaxValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that UInt32 values fit in Int32 encoding.</summary>
|
||||
[Fact]
|
||||
public void Encode_UInt32_FitsInInt32() => MxValueEncoder.Encode((uint)int.MaxValue).Int32Value.ShouldBe(int.MaxValue);
|
||||
|
||||
/// <summary>Verifies that float values encode correctly.</summary>
|
||||
[Fact]
|
||||
public void Encode_Float() => MxValueEncoder.Encode(3.14f).FloatValue.ShouldBe(3.14f);
|
||||
|
||||
/// <summary>Verifies that double values encode correctly.</summary>
|
||||
[Fact]
|
||||
public void Encode_Double() => MxValueEncoder.Encode(2.71828).DoubleValue.ShouldBe(2.71828);
|
||||
|
||||
/// <summary>Verifies that string values encode correctly.</summary>
|
||||
[Fact]
|
||||
public void Encode_String() => MxValueEncoder.Encode("hello").StringValue.ShouldBe("hello");
|
||||
|
||||
/// <summary>Verifies that UTC DateTime values encode correctly.</summary>
|
||||
[Fact]
|
||||
public void Encode_DateTimeUtc()
|
||||
{
|
||||
@@ -66,6 +78,7 @@ public sealed class MxValueEncoderTests
|
||||
v.TimestampValue.ToDateTime().ShouldBe(when);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that local DateTime values are converted to UTC during encoding.</summary>
|
||||
[Fact]
|
||||
public void Encode_DateTimeLocal_ConvertsToUtc()
|
||||
{
|
||||
@@ -74,6 +87,7 @@ public sealed class MxValueEncoderTests
|
||||
v.TimestampValue.ToDateTime().ShouldBe(local.ToUniversalTime());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that boolean arrays encode correctly.</summary>
|
||||
[Fact]
|
||||
public void Encode_BoolArray()
|
||||
{
|
||||
@@ -82,6 +96,7 @@ public sealed class MxValueEncoderTests
|
||||
v.ArrayValue.Dimensions[0].ShouldBe(3u);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that double arrays encode correctly.</summary>
|
||||
[Fact]
|
||||
public void Encode_DoubleArray()
|
||||
{
|
||||
@@ -89,6 +104,7 @@ public sealed class MxValueEncoderTests
|
||||
v.ArrayValue.DoubleValues.Values.ToArray().ShouldBe(new[] { 1.0, 2.0, 3.5 });
|
||||
}
|
||||
|
||||
/// <summary>Verifies that string arrays encode correctly.</summary>
|
||||
[Fact]
|
||||
public void Encode_StringArray()
|
||||
{
|
||||
@@ -96,6 +112,7 @@ public sealed class MxValueEncoderTests
|
||||
v.ArrayValue.StringValues.Values.ToArray().ShouldBe(new[] { "a", "b" });
|
||||
}
|
||||
|
||||
/// <summary>Verifies that all DateTime values in arrays are converted to UTC during encoding.</summary>
|
||||
[Fact]
|
||||
public void Encode_DateTimeArray_ConvertsAllToUtc()
|
||||
{
|
||||
@@ -104,12 +121,14 @@ public sealed class MxValueEncoderTests
|
||||
v.ArrayValue.TimestampValues.Values[0].ToDateTime().ShouldBe(inputs[0]);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that encoding an unsupported type throws an exception.</summary>
|
||||
[Fact]
|
||||
public void Encode_UnsupportedType_Throws()
|
||||
{
|
||||
Should.Throw<ArgumentException>(() => MxValueEncoder.Encode(new { Foo = 1 }));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that all scalar types round-trip correctly through encode and decode.</summary>
|
||||
[Fact]
|
||||
public void RoundTrip_AllScalarTypes_DecodeMatchesOriginal()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user