docs: complete XML doc comments via fixdocs (2757 to 131 findings)
Add missing <returns>/<param>/<summary>/<typeparam> tags and clean up misused inheritdoc across 481 files so the documented API surface is complete. Documentation-only (zero code lines changed). The 131 remaining findings are inheritdoc-style warnings deliberately left to preserve hand-written implementation rationale (plan-decision notes, race-condition explanations).
This commit is contained in:
+6
-12
@@ -18,6 +18,7 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests.Runtime;
|
||||
public sealed class EventPumpBoundedChannelTests
|
||||
{
|
||||
/// <summary>Verifies that the event pump drops newest events when the bounded channel fills and records metrics for dropped events.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Drops_newest_when_channel_fills_and_records_metric()
|
||||
{
|
||||
@@ -68,6 +69,7 @@ public sealed class EventPumpBoundedChannelTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the event pump throws an exception when the channel capacity is invalid.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Throws_when_channelCapacity_is_invalid()
|
||||
{
|
||||
@@ -81,6 +83,7 @@ public sealed class EventPumpBoundedChannelTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that event pump metrics are tagged with the client name for tracking multiple driver hosts.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Tags_metrics_with_client_name_for_multi_driver_hosts()
|
||||
{
|
||||
@@ -189,25 +192,16 @@ public sealed class EventPumpBoundedChannelTests
|
||||
private readonly Channel<MxEvent> _stream =
|
||||
Channel.CreateUnbounded<MxEvent>(new UnboundedChannelOptions { SingleReader = true });
|
||||
|
||||
/// <summary>Subscribes to a bulk list of tag references.</summary>
|
||||
/// <param name="fullReferences">The list of full references to subscribe to.</param>
|
||||
/// <param name="bufferedUpdateIntervalMs">The buffered update interval in milliseconds.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>An empty result list.</returns>
|
||||
/// <inheritdoc />
|
||||
public Task<IReadOnlyList<SubscribeResult>> SubscribeBulkAsync(
|
||||
IReadOnlyList<string> fullReferences, int bufferedUpdateIntervalMs, CancellationToken cancellationToken)
|
||||
=> Task.FromResult<IReadOnlyList<SubscribeResult>>([]);
|
||||
|
||||
/// <summary>Unsubscribes from a bulk list of item handles.</summary>
|
||||
/// <param name="itemHandles">The list of item handles to unsubscribe from.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>A completed task.</returns>
|
||||
/// <inheritdoc />
|
||||
public Task UnsubscribeBulkAsync(IReadOnlyList<int> itemHandles, CancellationToken cancellationToken)
|
||||
=> Task.CompletedTask;
|
||||
|
||||
/// <summary>Streams events asynchronously.</summary>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>An async enumerable of MxEvent objects.</returns>
|
||||
/// <inheritdoc />
|
||||
public IAsyncEnumerable<MxEvent> StreamEventsAsync(CancellationToken cancellationToken)
|
||||
=> _stream.Reader.ReadAllAsync(cancellationToken);
|
||||
|
||||
|
||||
+11
-18
@@ -19,6 +19,7 @@ public sealed class EventPumpStreamFaultTests
|
||||
private const int WaitMs = 2_000;
|
||||
|
||||
/// <summary>Verifies that stream fault invokes the callback with the exception.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task StreamFault_InvokesOnStreamFaultCallback_WithTheCause()
|
||||
{
|
||||
@@ -42,6 +43,7 @@ public sealed class EventPumpStreamFaultTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that stream fault drives the reconnect supervisor through reopen and replay.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task StreamFault_DrivesReconnectSupervisorReopenReplay()
|
||||
{
|
||||
@@ -79,6 +81,7 @@ public sealed class EventPumpStreamFaultTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a faulted pump cannot be restarted in place, but a fresh pump resumes dispatch.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task FaultedPump_IsNotRestartableInPlace_ButAFreshPumpResumesDispatch()
|
||||
{
|
||||
@@ -122,6 +125,7 @@ public sealed class EventPumpStreamFaultTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that clean shutdown does not invoke the stream fault callback.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task CleanShutdown_DoesNotInvokeOnStreamFault()
|
||||
{
|
||||
@@ -150,22 +154,16 @@ public sealed class EventPumpStreamFaultTests
|
||||
private readonly Channel<MxEvent> _stream =
|
||||
Channel.CreateUnbounded<MxEvent>(new UnboundedChannelOptions { SingleReader = true });
|
||||
|
||||
/// <summary>Subscribes to multiple tags (test stub).</summary>
|
||||
/// <param name="fullReferences">The tag references to subscribe to.</param>
|
||||
/// <param name="bufferedUpdateIntervalMs">The buffered update interval in milliseconds.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <inheritdoc />
|
||||
public Task<IReadOnlyList<SubscribeResult>> SubscribeBulkAsync(
|
||||
IReadOnlyList<string> fullReferences, int bufferedUpdateIntervalMs, CancellationToken cancellationToken)
|
||||
=> Task.FromResult<IReadOnlyList<SubscribeResult>>([]);
|
||||
|
||||
/// <summary>Unsubscribes from multiple tags (test stub).</summary>
|
||||
/// <param name="itemHandles">The item handles to unsubscribe from.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <inheritdoc />
|
||||
public Task UnsubscribeBulkAsync(IReadOnlyList<int> itemHandles, CancellationToken cancellationToken)
|
||||
=> Task.CompletedTask;
|
||||
|
||||
/// <summary>Streams events asynchronously (test stub).</summary>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <inheritdoc />
|
||||
public IAsyncEnumerable<MxEvent> StreamEventsAsync(CancellationToken cancellationToken)
|
||||
=> _stream.Reader.ReadAllAsync(cancellationToken);
|
||||
|
||||
@@ -183,28 +181,23 @@ public sealed class EventPumpStreamFaultTests
|
||||
private readonly Channel<MxEvent> _stream =
|
||||
Channel.CreateUnbounded<MxEvent>(new UnboundedChannelOptions { SingleReader = true });
|
||||
|
||||
/// <summary>Subscribes to multiple tags (test stub).</summary>
|
||||
/// <param name="fullReferences">The tag references to subscribe to.</param>
|
||||
/// <param name="bufferedUpdateIntervalMs">The buffered update interval in milliseconds.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <inheritdoc />
|
||||
public Task<IReadOnlyList<SubscribeResult>> SubscribeBulkAsync(
|
||||
IReadOnlyList<string> fullReferences, int bufferedUpdateIntervalMs, CancellationToken cancellationToken)
|
||||
=> Task.FromResult<IReadOnlyList<SubscribeResult>>([]);
|
||||
|
||||
/// <summary>Unsubscribes from multiple tags (test stub).</summary>
|
||||
/// <param name="itemHandles">The item handles to unsubscribe from.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <inheritdoc />
|
||||
public Task UnsubscribeBulkAsync(IReadOnlyList<int> itemHandles, CancellationToken cancellationToken)
|
||||
=> Task.CompletedTask;
|
||||
|
||||
/// <summary>Streams events asynchronously (test stub).</summary>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <inheritdoc />
|
||||
public IAsyncEnumerable<MxEvent> StreamEventsAsync(CancellationToken cancellationToken)
|
||||
=> _stream.Reader.ReadAllAsync(cancellationToken);
|
||||
|
||||
/// <summary>Emits a data change event asynchronously.</summary>
|
||||
/// <param name="itemHandle">The item handle for the data change.</param>
|
||||
/// <param name="value">The numeric value of the change.</param>
|
||||
/// <returns>A value task that represents the asynchronous operation.</returns>
|
||||
public ValueTask EmitAsync(int itemHandle, double value) =>
|
||||
_stream.Writer.WriteAsync(new MxEvent
|
||||
{
|
||||
|
||||
@@ -43,6 +43,7 @@ public sealed class GalaxyDriverReadTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadAsync routes through the injected reader.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReadAsync_RoutesThroughInjectedReader()
|
||||
{
|
||||
@@ -58,6 +59,7 @@ public sealed class GalaxyDriverReadTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadAsync returns empty without calling the reader for an empty request.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReadAsync_EmptyRequest_ReturnsEmpty_WithoutCallingReader()
|
||||
{
|
||||
@@ -71,6 +73,7 @@ public sealed class GalaxyDriverReadTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadAsync throws when seams and production runtime are not built.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReadAsync_NoSeams_AndNoProductionRuntime_Throws()
|
||||
{
|
||||
@@ -86,6 +89,7 @@ public sealed class GalaxyDriverReadTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadAsync throws after the driver is disposed.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReadAsync_AfterDispose_Throws()
|
||||
{
|
||||
@@ -96,6 +100,7 @@ public sealed class GalaxyDriverReadTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadAsync resolves from the first OnDataChange event on the subscribe-once path.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReadAsync_SubscribeOncePath_ResolvesFromFirstOnDataChange()
|
||||
{
|
||||
@@ -120,6 +125,7 @@ public sealed class GalaxyDriverReadTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadAsync surfaces rejected tags as bad status on the subscribe-once path.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReadAsync_SubscribeOncePath_RejectedTagSurfacesAsBadStatus()
|
||||
{
|
||||
@@ -140,6 +146,7 @@ public sealed class GalaxyDriverReadTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReadAsync preserves reader status codes.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReadAsync_PreservesReaderStatusCodes()
|
||||
{
|
||||
|
||||
+13
-13
@@ -40,11 +40,7 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
/// <summary>Gets or sets a function to decide whether to accept a subscription.</summary>
|
||||
public Func<string, bool> Decide { get; set; } = _ => true;
|
||||
|
||||
/// <summary>Subscribes to bulk updates for the specified tag references.</summary>
|
||||
/// <param name="fullReferences">The tag references to subscribe to.</param>
|
||||
/// <param name="bufferedUpdateIntervalMs">The buffered update interval in milliseconds.</param>
|
||||
/// <param name="cancellationToken">Cancellation token for the operation.</param>
|
||||
/// <returns>A list of subscription results.</returns>
|
||||
/// <inheritdoc />
|
||||
public Task<IReadOnlyList<SubscribeResult>> SubscribeBulkAsync(
|
||||
IReadOnlyList<string> fullReferences, int bufferedUpdateIntervalMs, CancellationToken cancellationToken)
|
||||
{
|
||||
@@ -77,19 +73,14 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
return Task.FromResult<IReadOnlyList<SubscribeResult>>(results);
|
||||
}
|
||||
|
||||
/// <summary>Unsubscribes from bulk updates for the specified item handles.</summary>
|
||||
/// <param name="itemHandles">The handles to unsubscribe.</param>
|
||||
/// <param name="cancellationToken">Cancellation token for the operation.</param>
|
||||
/// <returns>A completed task.</returns>
|
||||
/// <inheritdoc />
|
||||
public Task UnsubscribeBulkAsync(IReadOnlyList<int> itemHandles, CancellationToken cancellationToken)
|
||||
{
|
||||
UnsubscribedHandles.AddRange(itemHandles);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>Streams events asynchronously.</summary>
|
||||
/// <param name="cancellationToken">Cancellation token for the operation.</param>
|
||||
/// <returns>An async enumerable of MX events.</returns>
|
||||
/// <inheritdoc />
|
||||
public IAsyncEnumerable<MxEvent> StreamEventsAsync(CancellationToken cancellationToken)
|
||||
=> _events.Reader.ReadAllAsync(cancellationToken);
|
||||
|
||||
@@ -113,6 +104,7 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies subscription allocates a handle and dispatches value changes.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task SubscribeAsync_AllocatesHandle_AndDispatchesValueChange()
|
||||
{
|
||||
@@ -136,6 +128,7 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies two subscriptions for the same tag each receive updates.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task SubscribeAsync_TwoSubscriptions_SameTag_FanOutOnePerSubscription()
|
||||
{
|
||||
@@ -180,6 +173,7 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies failed subscriptions do not dispatch events.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task SubscribeAsync_FailedTag_DoesNotDispatchEvents()
|
||||
{
|
||||
@@ -201,6 +195,7 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies unsubscribe removes registration and calls gateway unsubscribe.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task UnsubscribeAsync_RemovesRegistration_AndCallsGwUnsubscribe()
|
||||
{
|
||||
@@ -224,6 +219,7 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies unsubscribing with an unknown handle is handled.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task UnsubscribeAsync_UnknownHandle_NoOp()
|
||||
{
|
||||
@@ -239,6 +235,7 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies subscription without a subscriber throws.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task SubscribeAsync_NoSubscriber_Throws()
|
||||
{
|
||||
@@ -249,6 +246,7 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies subscription falls back to configured interval when zero is passed.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task SubscribeAsync_FallsBackToConfiguredInterval_WhenCallerPassesZero()
|
||||
{
|
||||
@@ -269,6 +267,7 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies subscription respects caller's interval when non-zero.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task SubscribeAsync_RespectsCallerInterval_WhenNonZero()
|
||||
{
|
||||
@@ -289,6 +288,7 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies subscription with empty tag list returns handle without calling gateway.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task SubscribeAsync_EmptyTagList_ReturnsHandleWithoutCallingGw()
|
||||
{
|
||||
@@ -304,7 +304,7 @@ public sealed class GalaxyDriverSubscribeTests
|
||||
/// <summary>A subscription handle from a foreign source.</summary>
|
||||
private sealed class ForeignHandle : ISubscriptionHandle
|
||||
{
|
||||
/// <summary>Gets the diagnostic identifier for this handle.</summary>
|
||||
/// <inheritdoc />
|
||||
public string DiagnosticId => "foreign-x";
|
||||
}
|
||||
|
||||
|
||||
+14
-22
@@ -26,8 +26,7 @@ public sealed class GalaxyDriverWriteTests
|
||||
|
||||
private sealed class FakeHierarchySource(IReadOnlyList<GalaxyObject> objects) : IGalaxyHierarchySource
|
||||
{
|
||||
/// <summary>Returns the fake Galaxy object hierarchy.</summary>
|
||||
/// <param name="cancellationToken">Token to cancel the operation.</param>
|
||||
/// <inheritdoc />
|
||||
public Task<IReadOnlyList<GalaxyObject>> GetHierarchyAsync(CancellationToken cancellationToken)
|
||||
=> Task.FromResult(objects);
|
||||
}
|
||||
@@ -37,36 +36,26 @@ public sealed class GalaxyDriverWriteTests
|
||||
/// <summary>Gets the list of variables added to this builder.</summary>
|
||||
public List<DriverAttributeInfo> Variables { get; } = [];
|
||||
|
||||
/// <summary>Adds a folder and returns this builder for chaining.</summary>
|
||||
/// <param name="browseName">The browse name of the folder.</param>
|
||||
/// <param name="displayName">The display name of the folder.</param>
|
||||
/// <inheritdoc />
|
||||
public IAddressSpaceBuilder Folder(string browseName, string displayName) => this;
|
||||
/// <summary>Adds a variable to the variables list and returns a handle.</summary>
|
||||
/// <param name="browseName">The browse name of the variable.</param>
|
||||
/// <param name="displayName">The display name of the variable.</param>
|
||||
/// <param name="attributeInfo">The attribute information for the variable.</param>
|
||||
/// <inheritdoc />
|
||||
public IVariableHandle Variable(string browseName, string displayName, DriverAttributeInfo attributeInfo)
|
||||
{
|
||||
Variables.Add(attributeInfo);
|
||||
return new FakeHandle(attributeInfo.FullName);
|
||||
}
|
||||
/// <summary>No-op property adding operation for test compatibility.</summary>
|
||||
/// <param name="browseName">The browse name of the property.</param>
|
||||
/// <param name="dataType">The data type of the property.</param>
|
||||
/// <param name="value">The value of the property.</param>
|
||||
/// <inheritdoc />
|
||||
public void AddProperty(string browseName, DriverDataType dataType, object? value) { }
|
||||
|
||||
private sealed class FakeHandle(string fullRef) : IVariableHandle
|
||||
{
|
||||
/// <summary>Gets the full reference for this variable handle.</summary>
|
||||
/// <inheritdoc />
|
||||
public string FullReference { get; } = fullRef;
|
||||
/// <summary>Marks this variable as an alarm condition and returns a noop sink.</summary>
|
||||
/// <param name="info">The alarm condition information.</param>
|
||||
/// <inheritdoc />
|
||||
public IAlarmConditionSink MarkAsAlarmCondition(AlarmConditionInfo info) => new NoopSink();
|
||||
/// <summary>No-op alarm transition handler.</summary>
|
||||
private sealed class NoopSink : IAlarmConditionSink {
|
||||
/// <summary>Handles alarm state transition events.</summary>
|
||||
/// <param name="args">The alarm event arguments.</param>
|
||||
/// <inheritdoc />
|
||||
public void OnTransition(AlarmEventArgs args) { }
|
||||
}
|
||||
}
|
||||
@@ -77,10 +66,7 @@ public sealed class GalaxyDriverWriteTests
|
||||
/// <summary>Gets the list of write calls received by this writer.</summary>
|
||||
public List<(string FullRef, object? Value, SecurityClassification Resolved)> Calls { get; } = [];
|
||||
|
||||
/// <summary>Records write requests with their resolved security classifications.</summary>
|
||||
/// <param name="writes">The list of write requests to process.</param>
|
||||
/// <param name="securityResolver">Function to resolve security classification for each request.</param>
|
||||
/// <param name="cancellationToken">Token to cancel the operation.</param>
|
||||
/// <inheritdoc />
|
||||
public Task<IReadOnlyList<WriteResult>> WriteAsync(
|
||||
IReadOnlyList<WriteRequest> writes,
|
||||
Func<string, SecurityClassification> securityResolver,
|
||||
@@ -107,6 +93,7 @@ public sealed class GalaxyDriverWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that WriteAsync routes through the injected writer and propagates values correctly.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task WriteAsync_RoutesThroughInjectedWriter_AndPropagatesValues()
|
||||
{
|
||||
@@ -133,6 +120,7 @@ public sealed class GalaxyDriverWriteTests
|
||||
/// <summary>Verifies that WriteAsync resolves every security classification from discovery data.</summary>
|
||||
/// <param name="mxSec">The raw MXAccess security integer from the discovery attribute.</param>
|
||||
/// <param name="expected">The expected resolved security classification.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Theory]
|
||||
[InlineData(0, SecurityClassification.FreeAccess)]
|
||||
[InlineData(1, SecurityClassification.Operate)]
|
||||
@@ -157,6 +145,7 @@ public sealed class GalaxyDriverWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that unknown tags resolve to FreeAccess classification and writes proceed.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task WriteAsync_UnknownTag_ResolvesToFreeAccess_DefaultsToWrite()
|
||||
{
|
||||
@@ -172,6 +161,7 @@ public sealed class GalaxyDriverWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an empty write request returns empty without calling the writer.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task WriteAsync_EmptyRequest_ReturnsEmpty_WithoutCallingWriter()
|
||||
{
|
||||
@@ -186,6 +176,7 @@ public sealed class GalaxyDriverWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that WriteAsync throws when no writer is configured, referencing PR 4.4.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task WriteAsync_NoWriter_Throws_PointingAtPR44()
|
||||
{
|
||||
@@ -197,6 +188,7 @@ public sealed class GalaxyDriverWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that WriteAsync throws ObjectDisposedException after the driver is disposed.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task WriteAsync_AfterDispose_Throws()
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ public sealed class GalaxyTelemetryTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that TracedGalaxySubscriber emits a subscribe_bulk span with tag count.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task TracedGalaxySubscriber_emits_subscribe_bulk_span_with_tag_count()
|
||||
{
|
||||
@@ -52,6 +53,7 @@ public sealed class GalaxyTelemetryTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that TracedGalaxySubscriber records error and rethrows on failure.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task TracedGalaxySubscriber_records_error_and_rethrows_on_failure()
|
||||
{
|
||||
@@ -70,6 +72,7 @@ public sealed class GalaxyTelemetryTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that TracedGalaxyDataWriter tags the secured write count.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task TracedGalaxyDataWriter_tags_secured_write_count()
|
||||
{
|
||||
@@ -106,6 +109,7 @@ public sealed class GalaxyTelemetryTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that TracedGalaxyHierarchySource tags the object count.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task TracedGalaxyHierarchySource_tags_object_count()
|
||||
{
|
||||
@@ -182,7 +186,9 @@ public sealed class GalaxyTelemetryTests
|
||||
|
||||
private sealed class FakeHierarchy : IGalaxyHierarchySource
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>Returns a fixed two-element hierarchy for telemetry testing.</summary>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>A task that resolves to a two-element Galaxy object list.</returns>
|
||||
public Task<IReadOnlyList<ZB.MOM.WW.MxGateway.Contracts.Proto.Galaxy.GalaxyObject>> GetHierarchyAsync(
|
||||
CancellationToken cancellationToken)
|
||||
=> Task.FromResult<IReadOnlyList<ZB.MOM.WW.MxGateway.Contracts.Proto.Galaxy.GalaxyObject>>(
|
||||
|
||||
+2
@@ -21,6 +21,8 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests.Runtime;
|
||||
[Trait("Category", "Integration")]
|
||||
public sealed class GatewayGalaxyAlarmFeedLiveTests
|
||||
{
|
||||
/// <summary>Verifies that the live gateway delivers native alarm transitions through the consumer.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Live_gateway_delivers_native_alarm_transitions_through_the_consumer()
|
||||
{
|
||||
|
||||
+3
@@ -18,6 +18,7 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests.Runtime;
|
||||
public sealed class GatewayGalaxyAlarmFeedTests
|
||||
{
|
||||
/// <summary>Verifies that the feed decodes active alarm snapshots and live transitions.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Decodes_active_alarm_snapshot_then_live_transition()
|
||||
{
|
||||
@@ -70,6 +71,7 @@ public sealed class GatewayGalaxyAlarmFeedTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the feed drops transitions with unspecified kind and empty messages.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Drops_transition_with_unspecified_kind_and_empty_message()
|
||||
{
|
||||
@@ -107,6 +109,7 @@ public sealed class GatewayGalaxyAlarmFeedTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the feed reopens the stream after a transport fault.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Reopens_stream_after_a_transport_fault()
|
||||
{
|
||||
|
||||
+7
@@ -28,6 +28,7 @@ public sealed class ReconnectSupervisorTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that reporting a transport failure drives the supervisor through reopen and replay cycles back to healthy.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReportTransportFailure_DrivesThroughReopenReplay_BackToHealthy()
|
||||
{
|
||||
@@ -57,6 +58,7 @@ public sealed class ReconnectSupervisorTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that reopen failures trigger retries and the supervisor stays in reopening state between attempts.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReopenFailure_RetriesUntilSuccess_StaysInReopeningBetweenAttempts()
|
||||
{
|
||||
@@ -75,6 +77,7 @@ public sealed class ReconnectSupervisorTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that replay failures trigger a retry of the entire reopen-replay cycle.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReplayFailure_RetriesEntireCycle()
|
||||
{
|
||||
@@ -95,6 +98,7 @@ public sealed class ReconnectSupervisorTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that repeated failure reports during recovery do not spawn parallel recovery loops.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task RepeatedFailureReports_DuringRecovery_DoNotSpawnParallelLoops()
|
||||
{
|
||||
@@ -122,6 +126,7 @@ public sealed class ReconnectSupervisorTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the last error reflects the most recent failure cause from recovery attempts.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task LastError_ReflectsMostRecentFailureCause()
|
||||
{
|
||||
@@ -141,6 +146,7 @@ public sealed class ReconnectSupervisorTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that disposing the supervisor cancels a running recovery loop cleanly.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Dispose_CancelsRunningRecoveryLoop_Cleanly()
|
||||
{
|
||||
@@ -170,6 +176,7 @@ public sealed class ReconnectSupervisorTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that waiting for healthy state returns immediately when already healthy.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task WaitForHealthy_ReturnsImmediately_WhenAlreadyHealthy()
|
||||
{
|
||||
|
||||
+1
@@ -242,6 +242,7 @@ public sealed class SubscriptionRegistryTests
|
||||
public int TrackedItemHandleCount => _inner.TrackedItemHandleCount;
|
||||
|
||||
/// <summary>Gets the next subscription ID.</summary>
|
||||
/// <returns>A monotonically increasing subscription identifier.</returns>
|
||||
public long NextSubscriptionId() => _inner.NextSubscriptionId();
|
||||
|
||||
/// <summary>Registers a subscription with the given bindings.</summary>
|
||||
|
||||
Reference in New Issue
Block a user