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

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:
Joseph Doherty
2026-05-28 08:10:17 -04:00
parent f9fc7dd2e1
commit 64e3fbe035
756 changed files with 9876 additions and 96 deletions
@@ -10,13 +10,26 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip.Tests;
[Trait("Category", "Unit")]
public sealed class AbCipFetchUdtShapeTests
{
/// <summary>Test implementation of IAbCipTemplateReader.</summary>
private sealed class FakeTemplateReader : IAbCipTemplateReader
{
/// <summary>Gets or sets the response bytes to return.</summary>
public byte[] Response { get; set; } = [];
/// <summary>Gets the count of read operations.</summary>
public int ReadCount { get; private set; }
/// <summary>Gets a value indicating whether the reader has been disposed.</summary>
public bool Disposed { get; private set; }
/// <summary>Gets the last template ID read.</summary>
public uint LastTemplateId { get; private set; }
/// <summary>Reads the template data for the specified device and template ID.</summary>
/// <param name="deviceParams">The device parameters.</param>
/// <param name="templateInstanceId">The template instance ID.</param>
/// <param name="ct">The cancellation token.</param>
/// <returns>A task that returns the template response bytes.</returns>
public Task<byte[]> ReadAsync(AbCipTagCreateParams deviceParams, uint templateInstanceId, CancellationToken ct)
{
ReadCount++;
@@ -24,14 +37,21 @@ public sealed class AbCipFetchUdtShapeTests
return Task.FromResult(Response);
}
/// <summary>Disposes the reader.</summary>
public void Dispose() => Disposed = true;
}
/// <summary>Test factory for creating fake template readers.</summary>
private sealed class FakeTemplateReaderFactory : IAbCipTemplateReaderFactory
{
/// <summary>Gets the list of created readers.</summary>
public List<IAbCipTemplateReader> Readers { get; } = new();
/// <summary>Gets or sets an optional customization function for reader creation.</summary>
public Func<IAbCipTemplateReader>? Customise { get; set; }
/// <summary>Creates a new template reader.</summary>
/// <returns>The created reader.</returns>
public IAbCipTemplateReader Create()
{
var r = Customise?.Invoke() ?? new FakeTemplateReader();
@@ -72,6 +92,7 @@ public sealed class AbCipFetchUdtShapeTests
return (Task<AbCipUdtShape?>)mi.Invoke(drv, [deviceHostAddress, templateId, CancellationToken.None])!;
}
/// <summary>Verifies that FetchUdtShapeAsync decodes a blob and caches the result.</summary>
[Fact]
public async Task FetchUdtShapeAsync_decodes_blob_and_caches_result()
{
@@ -101,6 +122,7 @@ public sealed class AbCipFetchUdtShapeTests
factory.Readers.Count.ShouldBe(1);
}
/// <summary>Verifies that different template IDs result in separate fetch operations.</summary>
[Fact]
public async Task FetchUdtShapeAsync_different_templateIds_each_fetch()
{
@@ -131,6 +153,7 @@ public sealed class AbCipFetchUdtShapeTests
factory.Readers.Count.ShouldBe(2);
}
/// <summary>Verifies that FetchUdtShapeAsync returns null for an unknown device.</summary>
[Fact]
public async Task FetchUdtShapeAsync_unknown_device_returns_null()
{
@@ -146,6 +169,7 @@ public sealed class AbCipFetchUdtShapeTests
factory.Readers.ShouldBeEmpty();
}
/// <summary>Verifies that a decode failure returns null and does not cache the result.</summary>
[Fact]
public async Task FetchUdtShapeAsync_decode_failure_returns_null_and_does_not_cache()
{
@@ -168,6 +192,7 @@ public sealed class AbCipFetchUdtShapeTests
factory.Readers.Count.ShouldBe(2);
}
/// <summary>Verifies that a reader exception returns null.</summary>
[Fact]
public async Task FetchUdtShapeAsync_reader_exception_returns_null()
{
@@ -185,6 +210,7 @@ public sealed class AbCipFetchUdtShapeTests
shape.ShouldBeNull();
}
/// <summary>Verifies that FlushOptionalCachesAsync empties the template cache.</summary>
[Fact]
public async Task FlushOptionalCachesAsync_empties_template_cache()
{
@@ -212,10 +238,18 @@ public sealed class AbCipFetchUdtShapeTests
factory.Readers.Count.ShouldBe(2);
}
/// <summary>Test implementation of IAbCipTemplateReader that throws on read.</summary>
private sealed class ThrowingTemplateReader : IAbCipTemplateReader
{
/// <summary>Throws an exception when read is attempted.</summary>
/// <param name="p">The device parameters.</param>
/// <param name="id">The template ID.</param>
/// <param name="ct">The cancellation token.</param>
/// <returns>Never returns; throws instead.</returns>
public Task<byte[]> ReadAsync(AbCipTagCreateParams p, uint id, CancellationToken ct) =>
throw new InvalidOperationException("fake read failure");
/// <summary>Disposes the reader.</summary>
public void Dispose() { }
}
}