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:
+11
@@ -23,6 +23,7 @@ public sealed class ContractsWireParityTests
|
||||
// Fields at Key(0)=ValueBytes(null), Key(1)=Quality(0), Key(2)=TimestampUtcTicks(0)
|
||||
// MessagePack fixarray(3) + nil + fixint(0) + fixint(0) = 93 c0 00 00
|
||||
|
||||
/// <summary>Verifies that HistorianSampleDto serialized bytes are stable.</summary>
|
||||
[Fact]
|
||||
public void HistorianSampleDto_SerializedBytes_AreStable()
|
||||
{
|
||||
@@ -33,6 +34,7 @@ public sealed class ContractsWireParityTests
|
||||
bytes.ShouldBe(new byte[] { 0x93, 0xC0, 0x00, 0x00 });
|
||||
}
|
||||
|
||||
/// <summary>Verifies that HistorianSampleDto with value round-trips correctly.</summary>
|
||||
[Fact]
|
||||
public void HistorianSampleDto_WithValue_RoundTrips()
|
||||
{
|
||||
@@ -54,6 +56,7 @@ public sealed class ContractsWireParityTests
|
||||
// Key(0)=Value(null), Key(1)=TimestampUtcTicks(0)
|
||||
// fixarray(2) + nil + fixint(0) = 92 c0 00
|
||||
|
||||
/// <summary>Verifies that HistorianAggregateSampleDto serialized bytes are stable.</summary>
|
||||
[Fact]
|
||||
public void HistorianAggregateSampleDto_SerializedBytes_AreStable()
|
||||
{
|
||||
@@ -68,6 +71,7 @@ public sealed class ContractsWireParityTests
|
||||
// 5 fields at Key(0..4). TagName="", StartUtcTicks=0, EndUtcTicks=0, MaxValues=0, CorrelationId=""
|
||||
// fixarray(5) + fixstr(0)="" + fixint(0) + fixint(0) + fixint(0) + fixstr(0)=""
|
||||
|
||||
/// <summary>Verifies that an empty ReadRawRequest serializes as a fixed array of 5 elements.</summary>
|
||||
[Fact]
|
||||
public void ReadRawRequest_EmptyInstance_SerializesAsFixArray5()
|
||||
{
|
||||
@@ -82,6 +86,7 @@ public sealed class ContractsWireParityTests
|
||||
rt.MaxValues.ShouldBe(0);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadRawRequest with values round-trips correctly.</summary>
|
||||
[Fact]
|
||||
public void ReadRawRequest_WithValues_RoundTrips()
|
||||
{
|
||||
@@ -105,6 +110,7 @@ public sealed class ContractsWireParityTests
|
||||
|
||||
// ---- ReadRawReply ----
|
||||
|
||||
/// <summary>Verifies that ReadRawReply round-trips correctly.</summary>
|
||||
[Fact]
|
||||
public void ReadRawReply_RoundTrips()
|
||||
{
|
||||
@@ -128,6 +134,7 @@ public sealed class ContractsWireParityTests
|
||||
|
||||
// ---- ReadAtTimeRequest / ReadAtTimeReply ----
|
||||
|
||||
/// <summary>Verifies that ReadAtTimeRequest round-trips correctly.</summary>
|
||||
[Fact]
|
||||
public void ReadAtTimeRequest_RoundTrips()
|
||||
{
|
||||
@@ -143,6 +150,7 @@ public sealed class ContractsWireParityTests
|
||||
|
||||
// ---- WriteAlarmEventsRequest / WriteAlarmEventsReply ----
|
||||
|
||||
/// <summary>Verifies that WriteAlarmEventsRequest round-trips correctly.</summary>
|
||||
[Fact]
|
||||
public void WriteAlarmEventsRequest_RoundTrips()
|
||||
{
|
||||
@@ -175,6 +183,7 @@ public sealed class ContractsWireParityTests
|
||||
rt.Events[0].EventTimeUtcTicks.ShouldBe(999L);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that WriteAlarmEventsReply round-trips correctly.</summary>
|
||||
[Fact]
|
||||
public void WriteAlarmEventsReply_RoundTrips()
|
||||
{
|
||||
@@ -196,6 +205,7 @@ public sealed class ContractsWireParityTests
|
||||
// ---- MessageKind enum values are pinned ----
|
||||
// Changing a MessageKind value is a wire break; pin them explicitly.
|
||||
|
||||
/// <summary>Verifies that MessageKind enum values are stable.</summary>
|
||||
[Fact]
|
||||
public void MessageKind_Values_AreStable()
|
||||
{
|
||||
@@ -215,6 +225,7 @@ public sealed class ContractsWireParityTests
|
||||
|
||||
// ---- Framing constants are pinned ----
|
||||
|
||||
/// <summary>Verifies that framing constants are stable.</summary>
|
||||
[Fact]
|
||||
public void Framing_Constants_AreStable()
|
||||
{
|
||||
|
||||
+15
@@ -16,10 +16,19 @@ internal sealed class FakeSidecarServer : IAsyncDisposable
|
||||
private readonly CancellationTokenSource _cts = new();
|
||||
private Task? _loop;
|
||||
|
||||
/// <summary>Gets or sets the handler for ReadRaw requests.</summary>
|
||||
public Func<ReadRawRequest, ReadRawReply> OnReadRaw { get; set; } = _ => new ReadRawReply { Success = true };
|
||||
|
||||
/// <summary>Gets or sets the handler for ReadProcessed requests.</summary>
|
||||
public Func<ReadProcessedRequest, ReadProcessedReply> OnReadProcessed { get; set; } = _ => new ReadProcessedReply { Success = true };
|
||||
|
||||
/// <summary>Gets or sets the handler for ReadAtTime requests.</summary>
|
||||
public Func<ReadAtTimeRequest, ReadAtTimeReply> OnReadAtTime { get; set; } = _ => new ReadAtTimeReply { Success = true };
|
||||
|
||||
/// <summary>Gets or sets the handler for ReadEvents requests.</summary>
|
||||
public Func<ReadEventsRequest, ReadEventsReply> OnReadEvents { get; set; } = _ => new ReadEventsReply { Success = true };
|
||||
|
||||
/// <summary>Gets or sets the handler for WriteAlarmEvents requests.</summary>
|
||||
public Func<WriteAlarmEventsRequest, WriteAlarmEventsReply> OnWriteAlarmEvents { get; set; } = req
|
||||
=> new WriteAlarmEventsReply { Success = true, PerEventOk = Enumerable.Repeat(true, req.Events.Length).ToArray() };
|
||||
|
||||
@@ -46,14 +55,19 @@ internal sealed class FakeSidecarServer : IAsyncDisposable
|
||||
/// </summary>
|
||||
public bool StallAfterRequest { get; set; }
|
||||
|
||||
/// <summary>Initializes a new instance of FakeSidecarServer with the specified pipe name and expected secret.</summary>
|
||||
/// <param name="pipeName">The name of the named pipe to use for communication.</param>
|
||||
/// <param name="expectedSecret">The expected shared secret for handshake validation.</param>
|
||||
public FakeSidecarServer(string pipeName, string expectedSecret)
|
||||
{
|
||||
_pipeName = pipeName;
|
||||
_expectedSecret = expectedSecret;
|
||||
}
|
||||
|
||||
/// <summary>Gets the named pipe name used for communication.</summary>
|
||||
public string PipeName => _pipeName;
|
||||
|
||||
/// <summary>Starts the fake sidecar server asynchronously.</summary>
|
||||
public Task StartAsync()
|
||||
{
|
||||
_loop = Task.Run(() => RunAsync(_cts.Token));
|
||||
@@ -179,6 +193,7 @@ internal sealed class FakeSidecarServer : IAsyncDisposable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the fake sidecar server.</summary>
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
_cts.Cancel();
|
||||
|
||||
+11
@@ -28,6 +28,7 @@ public sealed class WonderwareHistorianClientTests
|
||||
ConnectTimeout: TimeSpan.FromSeconds(2),
|
||||
CallTimeout: TimeSpan.FromSeconds(2));
|
||||
|
||||
/// <summary>Verifies that ReadRawAsync round-trips samples and maps quality bytes to OPC UA status codes.</summary>
|
||||
[Fact]
|
||||
public async Task ReadRawAsync_RoundTripsSamples_AndMapsQualityByteToOpcUaStatusCode()
|
||||
{
|
||||
@@ -69,6 +70,7 @@ public sealed class WonderwareHistorianClientTests
|
||||
result.Samples[1].StatusCode.ShouldBe(0x808A0000u); // Bad_NotConnected
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadProcessedAsync maps null buckets to BadNoData status.</summary>
|
||||
[Fact]
|
||||
public async Task ReadProcessedAsync_NullBuckets_MapToBadNoData()
|
||||
{
|
||||
@@ -100,6 +102,7 @@ public sealed class WonderwareHistorianClientTests
|
||||
result.Samples[1].Value.ShouldBeNull();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadAtTimeAsync preserves timestamp order.</summary>
|
||||
[Fact]
|
||||
public async Task ReadAtTimeAsync_PreservesTimestampOrder()
|
||||
{
|
||||
@@ -127,6 +130,7 @@ public sealed class WonderwareHistorianClientTests
|
||||
result.Samples[1].SourceTimestampUtc.ShouldBe(t2);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadAtTimeAsync aligns by timestamp and fills gaps with bad status.</summary>
|
||||
[Fact]
|
||||
public async Task ReadAtTimeAsync_PartialAndReorderedReply_AlignsByTimestamp_AndFillsGapsAsBad()
|
||||
{
|
||||
@@ -180,6 +184,7 @@ public sealed class WonderwareHistorianClientTests
|
||||
result.Samples[2].Value.ShouldBe(3.0);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadEventsAsync preserves event field values.</summary>
|
||||
[Fact]
|
||||
public async Task ReadEventsAsync_PreservesEventFields()
|
||||
{
|
||||
@@ -217,6 +222,7 @@ public sealed class WonderwareHistorianClientTests
|
||||
result.Events[0].Severity.ShouldBe((ushort)800);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadRawAsync throws InvalidOperationException on server errors.</summary>
|
||||
[Fact]
|
||||
public async Task ReadRawAsync_ServerError_ThrowsInvalidOperation()
|
||||
{
|
||||
@@ -234,6 +240,7 @@ public sealed class WonderwareHistorianClientTests
|
||||
ex.Message.ShouldContain("historian unreachable");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that WriteBatchAsync maps per-event results to acknowledge or retry outcomes.</summary>
|
||||
[Fact]
|
||||
public async Task WriteBatchAsync_PerEventOk_MapsToAckOrRetryPlease()
|
||||
{
|
||||
@@ -262,6 +269,7 @@ public sealed class WonderwareHistorianClientTests
|
||||
outcomes[1].ShouldBe(HistorianWriteOutcome.RetryPlease);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that WriteBatchAsync returns retry outcomes for whole call failures.</summary>
|
||||
[Fact]
|
||||
public async Task WriteBatchAsync_WholeCallFailure_ReturnsRetryPleaseForEveryEvent()
|
||||
{
|
||||
@@ -291,6 +299,7 @@ public sealed class WonderwareHistorianClientTests
|
||||
outcomes[1].ShouldBe(HistorianWriteOutcome.RetryPlease);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Hello handshake throws UnauthorizedAccessException on secret mismatch.</summary>
|
||||
[Fact]
|
||||
public async Task Hello_BadSecret_ThrowsUnauthorizedAccess()
|
||||
{
|
||||
@@ -305,6 +314,7 @@ public sealed class WonderwareHistorianClientTests
|
||||
ex.Message.ShouldContain("shared-secret-mismatch");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the client retries after a transport drop.</summary>
|
||||
[Fact]
|
||||
public async Task Reconnect_AfterTransportDrop_RetriesOnce()
|
||||
{
|
||||
@@ -334,6 +344,7 @@ public sealed class WonderwareHistorianClientTests
|
||||
result.Samples.Count.ShouldBe(1);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that GetHealthSnapshot tracks success and failure counts.</summary>
|
||||
[Fact]
|
||||
public async Task GetHealthSnapshot_TracksSuccessAndFailureCounts()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user