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:
@@ -5,7 +5,7 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Tests;
|
||||
|
||||
internal class FakeTwinCATClient : ITwinCATClient
|
||||
{
|
||||
/// <summary>Gets a value indicating whether the client is connected.</summary>
|
||||
/// <inheritdoc />
|
||||
public bool IsConnected { get; private set; }
|
||||
/// <summary>Gets the number of times Connect has been called.</summary>
|
||||
public int ConnectCount { get; private set; }
|
||||
@@ -38,11 +38,7 @@ internal class FakeTwinCATClient : ITwinCATClient
|
||||
/// <summary>Test hook — fire the symbol-version-changed signal as the real client would.</summary>
|
||||
public void FireSymbolVersionChanged() => OnSymbolVersionChanged?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
/// <summary>Simulates connecting to the TwinCAT system.</summary>
|
||||
/// <param name="address">The AMS address to connect to.</param>
|
||||
/// <param name="timeout">The connection timeout.</param>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
/// <returns>A task that completes when the connection succeeds or fails.</returns>
|
||||
/// <inheritdoc />
|
||||
public virtual Task ConnectAsync(TwinCATAmsAddress address, TimeSpan timeout, CancellationToken ct)
|
||||
{
|
||||
ConnectCount++;
|
||||
@@ -51,12 +47,7 @@ internal class FakeTwinCATClient : ITwinCATClient
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>Simulates reading a value from a symbol.</summary>
|
||||
/// <param name="symbolPath">The path to the symbol to read.</param>
|
||||
/// <param name="type">The data type of the symbol.</param>
|
||||
/// <param name="bitIndex">The optional bit index for bit-level reads.</param>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
/// <returns>A task that returns the simulated value and status.</returns>
|
||||
/// <inheritdoc />
|
||||
public virtual Task<(object? value, uint status)> ReadValueAsync(
|
||||
string symbolPath, TwinCATDataType type, int? bitIndex, CancellationToken ct)
|
||||
{
|
||||
@@ -66,13 +57,7 @@ internal class FakeTwinCATClient : ITwinCATClient
|
||||
return Task.FromResult((value, status));
|
||||
}
|
||||
|
||||
/// <summary>Simulates writing a value to a symbol.</summary>
|
||||
/// <param name="symbolPath">The path to the symbol to write.</param>
|
||||
/// <param name="type">The data type of the symbol.</param>
|
||||
/// <param name="bitIndex">The optional bit index for bit-level writes.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
/// <returns>A task that returns the write status.</returns>
|
||||
/// <inheritdoc />
|
||||
public virtual Task<uint> WriteValueAsync(
|
||||
string symbolPath, TwinCATDataType type, int? bitIndex, object? value, CancellationToken ct)
|
||||
{
|
||||
@@ -83,9 +68,7 @@ internal class FakeTwinCATClient : ITwinCATClient
|
||||
return Task.FromResult(status);
|
||||
}
|
||||
|
||||
/// <summary>Simulates probing the connection status.</summary>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
/// <returns>A task that returns the probe result.</returns>
|
||||
/// <inheritdoc />
|
||||
public virtual Task<bool> ProbeAsync(CancellationToken ct)
|
||||
{
|
||||
if (ThrowOnProbe) return Task.FromResult(false);
|
||||
@@ -108,15 +91,7 @@ internal class FakeTwinCATClient : ITwinCATClient
|
||||
/// <summary>Records the most recently-supplied <c>maxDelayMs</c> for Driver.TwinCAT-014 tests.</summary>
|
||||
public int LastMaxDelayMs { get; private set; }
|
||||
|
||||
/// <summary>Simulates adding a notification for value changes.</summary>
|
||||
/// <param name="symbolPath">The path to the symbol to watch.</param>
|
||||
/// <param name="type">The data type of the symbol.</param>
|
||||
/// <param name="bitIndex">The optional bit index for bit-level notifications.</param>
|
||||
/// <param name="cycleTime">The sampling cycle time.</param>
|
||||
/// <param name="maxDelayMs">The maximum delay in milliseconds.</param>
|
||||
/// <param name="onChange">The callback to invoke on value change.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>A task that returns a notification handle.</returns>
|
||||
/// <inheritdoc />
|
||||
public virtual Task<ITwinCATNotificationHandle> AddNotificationAsync(
|
||||
string symbolPath, TwinCATDataType type, int? bitIndex, TimeSpan cycleTime,
|
||||
int maxDelayMs, Action<string, object?> onChange, CancellationToken cancellationToken)
|
||||
@@ -147,9 +122,7 @@ internal class FakeTwinCATClient : ITwinCATClient
|
||||
/// <summary>Gets or sets a value indicating whether BrowseSymbolsAsync should throw.</summary>
|
||||
public bool ThrowOnBrowse { get; set; }
|
||||
|
||||
/// <summary>Simulates browsing the symbol tree.</summary>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>An async enumerable of discovered symbols.</returns>
|
||||
/// <inheritdoc />
|
||||
public virtual async IAsyncEnumerable<TwinCATDiscoveredSymbol> BrowseSymbolsAsync(
|
||||
[EnumeratorCancellation] CancellationToken cancellationToken)
|
||||
{
|
||||
@@ -195,8 +168,7 @@ internal sealed class FakeTwinCATClientFactory : ITwinCATClientFactory
|
||||
/// <summary>Gets or sets an optional customization function for creating clients.</summary>
|
||||
public Func<FakeTwinCATClient>? Customise { get; set; }
|
||||
|
||||
/// <summary>Creates a new fake TwinCAT client.</summary>
|
||||
/// <returns>A newly created client instance.</returns>
|
||||
/// <inheritdoc />
|
||||
public ITwinCATClient Create()
|
||||
{
|
||||
var client = Customise?.Invoke() ?? new FakeTwinCATClient();
|
||||
|
||||
@@ -12,6 +12,7 @@ public sealed class TwinCATCapabilityTests
|
||||
// ---- ITagDiscovery ----
|
||||
|
||||
/// <summary>Verifies that DiscoverAsync emits pre-declared tags.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task DiscoverAsync_emits_pre_declared_tags()
|
||||
{
|
||||
@@ -39,6 +40,7 @@ public sealed class TwinCATCapabilityTests
|
||||
// ---- ISubscribable ----
|
||||
|
||||
/// <summary>Verifies that Subscribe initial poll raises OnDataChange.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Subscribe_initial_poll_raises_OnDataChange()
|
||||
{
|
||||
@@ -66,6 +68,7 @@ public sealed class TwinCATCapabilityTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ShutdownAsync cancels active subscriptions.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ShutdownAsync_cancels_active_subscriptions()
|
||||
{
|
||||
@@ -97,6 +100,7 @@ public sealed class TwinCATCapabilityTests
|
||||
// ---- IHostConnectivityProbe ----
|
||||
|
||||
/// <summary>Verifies that GetHostStatuses returns entry per device.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task GetHostStatuses_returns_entry_per_device()
|
||||
{
|
||||
@@ -115,6 +119,7 @@ public sealed class TwinCATCapabilityTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Probe transitions to Running on successful probe.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Probe_transitions_to_Running_on_successful_probe()
|
||||
{
|
||||
@@ -142,6 +147,7 @@ public sealed class TwinCATCapabilityTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Probe transitions to Stopped on probe failure.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Probe_transitions_to_Stopped_on_probe_failure()
|
||||
{
|
||||
@@ -169,6 +175,7 @@ public sealed class TwinCATCapabilityTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Probe is disabled when Enabled is false.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Probe_disabled_when_Enabled_is_false()
|
||||
{
|
||||
@@ -188,6 +195,7 @@ public sealed class TwinCATCapabilityTests
|
||||
// ---- IPerCallHostResolver ----
|
||||
|
||||
/// <summary>Verifies that ResolveHost returns declared device for known tag.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ResolveHost_returns_declared_device_for_known_tag()
|
||||
{
|
||||
@@ -212,6 +220,7 @@ public sealed class TwinCATCapabilityTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ResolveHost falls back to first device for unknown reference.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ResolveHost_falls_back_to_first_device_for_unknown_ref()
|
||||
{
|
||||
@@ -226,6 +235,7 @@ public sealed class TwinCATCapabilityTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ResolveHost falls back to unresolved sentinel when no devices.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ResolveHost_falls_back_to_unresolved_sentinel_when_no_devices()
|
||||
{
|
||||
@@ -253,39 +263,26 @@ public sealed class TwinCATCapabilityTests
|
||||
/// <summary>Gets the list of variables added to the address space.</summary>
|
||||
public List<(string BrowseName, DriverAttributeInfo Info)> Variables { get; } = new();
|
||||
|
||||
/// <summary>Adds a folder with the specified browse name and display name.</summary>
|
||||
/// <param name="browseName">The browse name of the folder.</param>
|
||||
/// <param name="displayName">The display name of the folder.</param>
|
||||
/// <returns>This builder instance.</returns>
|
||||
/// <inheritdoc />
|
||||
public IAddressSpaceBuilder Folder(string browseName, string displayName)
|
||||
{ Folders.Add((browseName, displayName)); return this; }
|
||||
|
||||
/// <summary>Adds a variable with the specified browse name, display name, and attribute info.</summary>
|
||||
/// <param name="browseName">The browse name of the variable.</param>
|
||||
/// <param name="displayName">The display name of the variable.</param>
|
||||
/// <param name="info">The driver attribute information for the variable.</param>
|
||||
/// <returns>A variable handle for the added variable.</returns>
|
||||
/// <inheritdoc />
|
||||
public IVariableHandle Variable(string browseName, string displayName, DriverAttributeInfo info)
|
||||
{ Variables.Add((browseName, info)); return new Handle(info.FullName); }
|
||||
|
||||
/// <summary>Adds a property to a variable.</summary>
|
||||
/// <param name="_">The property name.</param>
|
||||
/// <param name="__">The property data type.</param>
|
||||
/// <param name="___">The property value.</param>
|
||||
/// <inheritdoc />
|
||||
public void AddProperty(string _, DriverDataType __, object? ___) { }
|
||||
|
||||
private sealed class Handle(string fullRef) : IVariableHandle
|
||||
{
|
||||
/// <summary>Gets the full reference name of the variable.</summary>
|
||||
/// <inheritdoc />
|
||||
public string FullReference => fullRef;
|
||||
/// <summary>Marks the variable as an alarm condition.</summary>
|
||||
/// <param name="info">The alarm condition information.</param>
|
||||
/// <returns>An alarm condition sink.</returns>
|
||||
/// <inheritdoc />
|
||||
public IAlarmConditionSink MarkAsAlarmCondition(AlarmConditionInfo info) => new NullSink();
|
||||
}
|
||||
private sealed class NullSink : IAlarmConditionSink {
|
||||
/// <summary>Called when an alarm transitions.</summary>
|
||||
/// <param name="args">The alarm event arguments.</param>
|
||||
/// <inheritdoc />
|
||||
public void OnTransition(AlarmEventArgs args) { } }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ public sealed class TwinCATDriverTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that device addresses are parsed during initialization.</summary>
|
||||
/// <returns>A task that represents the asynchronous test.</returns>
|
||||
[Fact]
|
||||
public async Task InitializeAsync_parses_device_addresses()
|
||||
{
|
||||
@@ -38,6 +39,7 @@ public sealed class TwinCATDriverTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that malformed device addresses cause initialization to fault.</summary>
|
||||
/// <returns>A task that represents the asynchronous test.</returns>
|
||||
[Fact]
|
||||
public async Task InitializeAsync_malformed_address_faults()
|
||||
{
|
||||
@@ -52,6 +54,7 @@ public sealed class TwinCATDriverTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that shutdown clears all devices.</summary>
|
||||
/// <returns>A task that represents the asynchronous test.</returns>
|
||||
[Fact]
|
||||
public async Task ShutdownAsync_clears_devices()
|
||||
{
|
||||
@@ -68,6 +71,7 @@ public sealed class TwinCATDriverTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that reinitialization cycles devices.</summary>
|
||||
/// <returns>A task that represents the asynchronous test.</returns>
|
||||
[Fact]
|
||||
public async Task ReinitializeAsync_cycles_devices()
|
||||
{
|
||||
|
||||
+6
@@ -20,6 +20,7 @@ public sealed class TwinCATHighFindingsRegressionTests
|
||||
// ---- Driver.TwinCAT-001 — Reinitialize applies the new config generation ----
|
||||
|
||||
/// <summary>Verifies ReinitializeAsync applies new device configuration at runtime.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReinitializeAsync_applies_changed_device_config()
|
||||
{
|
||||
@@ -49,6 +50,7 @@ public sealed class TwinCATHighFindingsRegressionTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies InitializeAsync applies supplied JSON config over constructor options.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task InitializeAsync_applies_supplied_config_over_constructor_options()
|
||||
{
|
||||
@@ -83,6 +85,7 @@ public sealed class TwinCATHighFindingsRegressionTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies 64-bit LInt reads preserve values larger than int.MaxValue.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task LInt_read_round_trips_value_above_int_MaxValue()
|
||||
{
|
||||
@@ -107,6 +110,7 @@ public sealed class TwinCATHighFindingsRegressionTests
|
||||
// ---- Driver.TwinCAT-007 — concurrent EnsureConnectedAsync creates exactly one client ----
|
||||
|
||||
/// <summary>Verifies concurrent reads on one device create and share exactly one client.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Concurrent_reads_on_one_device_create_a_single_client()
|
||||
{
|
||||
@@ -130,6 +134,7 @@ public sealed class TwinCATHighFindingsRegressionTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies concurrent reads and writes on one device share exactly one client.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Concurrent_reads_and_writes_share_one_client()
|
||||
{
|
||||
@@ -166,6 +171,7 @@ public sealed class TwinCATHighFindingsRegressionTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies symbol version change events raise the OnRediscoveryNeeded event.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Symbol_version_changed_raises_OnRediscoveryNeeded()
|
||||
{
|
||||
|
||||
+4
@@ -37,6 +37,7 @@ public sealed class TwinCATLowFindingsRegressionTests
|
||||
// ---- Driver.TwinCAT-006 — ResolveHost sentinel when no devices are configured ----
|
||||
|
||||
/// <summary>Verifies that ResolveHost returns an unresolved sentinel when no devices are configured.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ResolveHost_returns_unresolved_sentinel_when_no_devices()
|
||||
{
|
||||
@@ -51,6 +52,7 @@ public sealed class TwinCATLowFindingsRegressionTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the unresolved sentinel does not match any GetHostStatuses entry.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ResolveHost_unresolved_sentinel_matches_no_GetHostStatuses_entry()
|
||||
{
|
||||
@@ -65,6 +67,7 @@ public sealed class TwinCATLowFindingsRegressionTests
|
||||
// ---- Driver.TwinCAT-014 — config surface knobs are honoured ----
|
||||
|
||||
/// <summary>Verifies that ProbeOptions.Timeout is applied to probe calls.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ProbeOptions_Timeout_is_applied_to_probe_calls()
|
||||
{
|
||||
@@ -209,6 +212,7 @@ public sealed class TwinCATLowFindingsRegressionTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the probe loop and read operations share one client per device.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Probe_loop_and_read_share_one_client_per_device()
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@ public sealed class TwinCATNativeNotificationTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that native subscribe registers one notification per tag.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Native_subscribe_registers_one_notification_per_tag()
|
||||
{
|
||||
@@ -39,6 +40,7 @@ public sealed class TwinCATNativeNotificationTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that native notification fires OnDataChange with pushed value.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Native_notification_fires_OnDataChange_with_pushed_value()
|
||||
{
|
||||
@@ -60,6 +62,7 @@ public sealed class TwinCATNativeNotificationTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that native unsubscribe disposes all notifications.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Native_unsubscribe_disposes_all_notifications()
|
||||
{
|
||||
@@ -76,6 +79,7 @@ public sealed class TwinCATNativeNotificationTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that native unsubscribe halts future notifications.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Native_unsubscribe_halts_future_notifications()
|
||||
{
|
||||
@@ -99,6 +103,7 @@ public sealed class TwinCATNativeNotificationTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that native subscribe failure mid-registration cleans up partial state.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Native_subscribe_failure_mid_registration_cleans_up_partial_state()
|
||||
{
|
||||
@@ -157,6 +162,7 @@ public sealed class TwinCATNativeNotificationTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that native shutdown disposes subscriptions.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Native_shutdown_disposes_subscriptions()
|
||||
{
|
||||
@@ -172,6 +178,7 @@ public sealed class TwinCATNativeNotificationTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the poll path still works when UseNativeNotifications is false.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Poll_path_still_works_when_UseNativeNotifications_false()
|
||||
{
|
||||
@@ -200,6 +207,7 @@ public sealed class TwinCATNativeNotificationTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that subscribe handle DiagnosticId indicates native vs poll.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Subscribe_handle_DiagnosticId_indicates_native_vs_poll()
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@ public sealed class TwinCATReadWriteTests
|
||||
// ---- Read ----
|
||||
|
||||
/// <summary>Verifies that an unknown reference maps to BadNodeIdUnknown status.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Unknown_reference_maps_to_BadNodeIdUnknown()
|
||||
{
|
||||
@@ -34,6 +35,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a successful DInt read returns Good status and the correct value.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Successful_DInt_read_returns_Good_value()
|
||||
{
|
||||
@@ -51,6 +53,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that repeated read operations reuse the same connection.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Repeat_read_reuses_connection()
|
||||
{
|
||||
@@ -69,6 +72,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ADS read errors are mapped via the status mapper.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Read_with_ADS_error_maps_via_status_mapper()
|
||||
{
|
||||
@@ -87,6 +91,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that read exceptions surface as BadCommunicationError status.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Read_exception_surfaces_BadCommunicationError()
|
||||
{
|
||||
@@ -101,6 +106,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that connect failures surface BadCommunicationError and dispose the client.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Connect_failure_surfaces_BadCommunicationError_and_disposes_client()
|
||||
{
|
||||
@@ -115,6 +121,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that batched read operations preserve the order of results.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Batched_reads_preserve_order()
|
||||
{
|
||||
@@ -142,6 +149,7 @@ public sealed class TwinCATReadWriteTests
|
||||
// ---- Write ----
|
||||
|
||||
/// <summary>Verifies that non-writable tags are rejected with BadNotWritable status.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Non_writable_tag_rejected_with_BadNotWritable()
|
||||
{
|
||||
@@ -155,6 +163,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that successful writes log the symbol, type, and value correctly.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Successful_write_logs_symbol_type_value()
|
||||
{
|
||||
@@ -173,6 +182,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ADS write errors are mapped and surfaced correctly.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Write_with_ADS_error_surfaces_mapped_status()
|
||||
{
|
||||
@@ -192,6 +202,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that write exceptions surface as BadCommunicationError status.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Write_exception_surfaces_BadCommunicationError()
|
||||
{
|
||||
@@ -206,6 +217,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that batched write operations preserve order across mixed outcomes.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Batch_write_preserves_order_across_outcomes()
|
||||
{
|
||||
@@ -236,6 +248,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that cancellation tokens propagate correctly during read operations.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Cancellation_propagates()
|
||||
{
|
||||
@@ -253,6 +266,7 @@ public sealed class TwinCATReadWriteTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that shutdown disposes the client correctly.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ShutdownAsync_disposes_client()
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Tests;
|
||||
public sealed class TwinCATSymbolBrowserTests
|
||||
{
|
||||
/// <summary>Verifies that discovery without EnableControllerBrowse only emits predeclared tags.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Discovery_without_EnableControllerBrowse_emits_only_predeclared()
|
||||
{
|
||||
@@ -38,6 +39,7 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that discovery with browse enabled adds controller symbols under Discovered folder.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Discovery_with_browse_enabled_adds_controller_symbols_under_Discovered_folder()
|
||||
{
|
||||
@@ -68,6 +70,7 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that browse filters out system symbols correctly.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Browse_filters_system_symbols()
|
||||
{
|
||||
@@ -99,6 +102,7 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that browse skips symbols with null datatype.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Browse_skips_symbols_with_null_datatype()
|
||||
{
|
||||
@@ -127,6 +131,7 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that read-only symbols surface as ViewOnly.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReadOnly_symbol_surfaces_ViewOnly()
|
||||
{
|
||||
@@ -154,6 +159,7 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that browse failure is non-fatal and predeclared tags still emit.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task Browse_failure_is_non_fatal_predeclared_still_emits()
|
||||
{
|
||||
@@ -252,9 +258,7 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
public IAlarmConditionSink MarkAsAlarmCondition(AlarmConditionInfo info) => new NullSink();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A null implementation of IAlarmConditionSink for test purposes.
|
||||
/// </summary>
|
||||
/// <summary>A null implementation of IAlarmConditionSink for test purposes.</summary>
|
||||
private sealed class NullSink : IAlarmConditionSink
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user