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:
@@ -16,6 +16,7 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests;
|
||||
/// </summary>
|
||||
public sealed class GalaxyDriverAlarmSourceTests
|
||||
{
|
||||
/// <summary>Verifies that SubscribeAlarmsAsync starts the alarm feed and events fire on transition.</summary>
|
||||
[Fact]
|
||||
public async Task SubscribeAlarmsAsync_starts_feed_and_event_fires_on_transition()
|
||||
{
|
||||
@@ -41,6 +42,7 @@ public sealed class GalaxyDriverAlarmSourceTests
|
||||
observed[0].SubscriptionHandle.ShouldBe(handle);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that OnAlarmEvent does not fire before any alarm subscription.</summary>
|
||||
[Fact]
|
||||
public void OnAlarmEvent_does_not_fire_before_any_alarm_subscription()
|
||||
{
|
||||
@@ -59,6 +61,7 @@ public sealed class GalaxyDriverAlarmSourceTests
|
||||
observed.ShouldBeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that UnsubscribeAlarmsAsync stops event flow.</summary>
|
||||
[Fact]
|
||||
public async Task UnsubscribeAlarmsAsync_stops_event_flow()
|
||||
{
|
||||
@@ -80,6 +83,7 @@ public sealed class GalaxyDriverAlarmSourceTests
|
||||
observed.ShouldBeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that UnsubscribeAlarmsAsync throws for a foreign handle.</summary>
|
||||
[Fact]
|
||||
public async Task UnsubscribeAlarmsAsync_throws_for_foreign_handle()
|
||||
{
|
||||
@@ -92,6 +96,7 @@ public sealed class GalaxyDriverAlarmSourceTests
|
||||
driver.UnsubscribeAlarmsAsync(foreignHandle, CancellationToken.None));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that AcknowledgeAsync routes each request to the acknowledger.</summary>
|
||||
[Fact]
|
||||
public async Task AcknowledgeAsync_routes_each_request_to_the_acknowledger()
|
||||
{
|
||||
@@ -113,6 +118,7 @@ public sealed class GalaxyDriverAlarmSourceTests
|
||||
ack.Calls[1].AlarmRef.ShouldBe("Tank02.Level.HiHi");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that AcknowledgeAsync falls back to SourceNodeId when ConditionId is empty.</summary>
|
||||
[Fact]
|
||||
public async Task AcknowledgeAsync_falls_back_to_SourceNodeId_when_ConditionId_empty()
|
||||
{
|
||||
@@ -127,6 +133,7 @@ public sealed class GalaxyDriverAlarmSourceTests
|
||||
ack.Calls[0].AlarmRef.ShouldBe("Tank01.Level.HiHi");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that AcknowledgeAsync throws NotSupportedException without an acknowledger.</summary>
|
||||
[Fact]
|
||||
public async Task AcknowledgeAsync_throws_NotSupported_without_acknowledger()
|
||||
{
|
||||
@@ -178,22 +185,37 @@ public sealed class GalaxyDriverAlarmSourceTests
|
||||
/// <summary>In-memory <see cref="IGalaxyAlarmFeed"/> the test drives directly.</summary>
|
||||
private sealed class FakeAlarmFeed : IGalaxyAlarmFeed
|
||||
{
|
||||
/// <summary>Gets a value indicating whether the feed has been started.</summary>
|
||||
public bool Started { get; private set; }
|
||||
|
||||
/// <summary>Occurs when an alarm transition is emitted.</summary>
|
||||
public event EventHandler<GalaxyAlarmTransition>? OnAlarmTransition;
|
||||
|
||||
/// <summary>Marks the feed as started.</summary>
|
||||
public void Start() => Started = true;
|
||||
|
||||
/// <summary>Emits an alarm transition to all subscribers.</summary>
|
||||
/// <param name="transition">The transition to emit.</param>
|
||||
public void Emit(GalaxyAlarmTransition transition)
|
||||
=> OnAlarmTransition?.Invoke(this, transition);
|
||||
|
||||
/// <summary>Disposes the fake feed.</summary>
|
||||
/// <returns>A completed task.</returns>
|
||||
public ValueTask DisposeAsync() => ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>Test double that records all acknowledge calls.</summary>
|
||||
private sealed class RecordingAcknowledger : IGalaxyAlarmAcknowledger
|
||||
{
|
||||
/// <summary>Gets the list of acknowledge calls recorded.</summary>
|
||||
public List<(string AlarmRef, string Comment, string Operator)> Calls { get; } = [];
|
||||
|
||||
/// <summary>Records an acknowledge call.</summary>
|
||||
/// <param name="alarmFullReference">The alarm full reference.</param>
|
||||
/// <param name="comment">The acknowledgment comment.</param>
|
||||
/// <param name="operatorUser">The operator user.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>A completed task.</returns>
|
||||
public Task AcknowledgeAsync(string alarmFullReference, string comment, string operatorUser, CancellationToken cancellationToken)
|
||||
{
|
||||
Calls.Add((alarmFullReference, comment, operatorUser));
|
||||
@@ -201,8 +223,10 @@ public sealed class GalaxyDriverAlarmSourceTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Test double that represents a foreign alarm subscription handle.</summary>
|
||||
private sealed class ForeignAlarmHandle : IAlarmSubscriptionHandle
|
||||
{
|
||||
/// <summary>Gets the diagnostic ID for this handle.</summary>
|
||||
public string DiagnosticId => "foreign";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user