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:
@@ -14,6 +14,8 @@ public sealed class BrowseSessionReaperTests
|
||||
private static BrowseSessionReaper NewReaper(BrowseSessionRegistry registry) =>
|
||||
new(registry, NullLogger<BrowseSessionReaper>.Instance);
|
||||
|
||||
/// <summary>Verifies that ReapOnceAsync evicts a session that has been idle beyond the timeout.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReapOnceAsync_evicts_idle_session()
|
||||
{
|
||||
@@ -31,6 +33,8 @@ public sealed class BrowseSessionReaperTests
|
||||
session.Disposed.ShouldBeTrue();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReapOnceAsync preserves a recently used session.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReapOnceAsync_preserves_recent_session()
|
||||
{
|
||||
@@ -45,6 +49,8 @@ public sealed class BrowseSessionReaperTests
|
||||
session.Disposed.ShouldBeFalse();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReapOnceAsync handles a session already removed from the registry without throwing.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReapOnceAsync_handles_already_removed_session()
|
||||
{
|
||||
@@ -65,6 +71,8 @@ public sealed class BrowseSessionReaperTests
|
||||
session.Disposed.ShouldBeFalse();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ReapOnceAsync continues processing remaining sessions when one session's dispose throws.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReapOnceAsync_continues_when_one_session_dispose_throws()
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace ZB.MOM.WW.OtOpcUa.AdminUI.Tests.Browsing;
|
||||
/// concurrent-registration behaviour.</summary>
|
||||
public sealed class BrowseSessionRegistryTests
|
||||
{
|
||||
/// <summary>Verifies that a registered session can be retrieved by its token.</summary>
|
||||
[Fact]
|
||||
public void Register_then_TryGet_returns_session()
|
||||
{
|
||||
@@ -22,6 +23,7 @@ public sealed class BrowseSessionRegistryTests
|
||||
got.ShouldBeSameAs((IBrowseSession)session);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that looking up an unknown token returns false.</summary>
|
||||
[Fact]
|
||||
public void TryGet_unknown_returns_false()
|
||||
{
|
||||
@@ -31,6 +33,7 @@ public sealed class BrowseSessionRegistryTests
|
||||
got.ShouldBeNull();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a removed session can no longer be retrieved.</summary>
|
||||
[Fact]
|
||||
public void TryRemove_then_TryGet_returns_false()
|
||||
{
|
||||
@@ -43,6 +46,8 @@ public sealed class BrowseSessionRegistryTests
|
||||
registry.TryGet(session.Token, out _).ShouldBeFalse();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that concurrent registrations from many tasks are all visible in the snapshot.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Concurrent_Register_from_many_tasks_all_visible_in_Snapshot()
|
||||
{
|
||||
|
||||
@@ -15,6 +15,8 @@ public sealed class BrowserSessionServiceTests
|
||||
BrowseSessionRegistry registry, params IDriverBrowser[] browsers) =>
|
||||
new(browsers, registry, NullLogger<BrowserSessionService>.Instance);
|
||||
|
||||
/// <summary>Verifies that OpenAsync returns Ok=false with a message when the driver type is unknown.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task OpenAsync_unknown_driver_type_returns_Ok_false_with_message()
|
||||
{
|
||||
@@ -29,6 +31,8 @@ public sealed class BrowserSessionServiceTests
|
||||
result.Message!.ShouldContain("Unknown");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that OpenAsync returns a token and registers the session on the happy path.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task OpenAsync_happy_path_returns_token_and_registers()
|
||||
{
|
||||
@@ -50,6 +54,8 @@ public sealed class BrowserSessionServiceTests
|
||||
registered.ShouldBeSameAs((IBrowseSession)session);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that OpenAsync swallows driver exceptions and returns Ok=false.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task OpenAsync_swallows_driver_throws_returns_Ok_false()
|
||||
{
|
||||
@@ -68,6 +74,8 @@ public sealed class BrowserSessionServiceTests
|
||||
result.Message!.ShouldContain("boom");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that RootAsync throws BrowseSessionNotFoundException for an unknown token.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task RootAsync_unknown_token_throws_BrowseSessionNotFoundException()
|
||||
{
|
||||
@@ -78,6 +86,8 @@ public sealed class BrowserSessionServiceTests
|
||||
() => service.RootAsync(Guid.NewGuid(), CancellationToken.None));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that RootAsync invokes the session Root method and returns its result.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task RootAsync_invokes_session_Root()
|
||||
{
|
||||
@@ -96,6 +106,8 @@ public sealed class BrowserSessionServiceTests
|
||||
actual.ShouldBe(expected);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that RootAsync cancels the call when the per-call timeout elapses.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task RootAsync_enforces_PerCallTimeout()
|
||||
{
|
||||
@@ -118,6 +130,8 @@ public sealed class BrowserSessionServiceTests
|
||||
sw.Elapsed.ShouldBeLessThan(TimeSpan.FromSeconds(35));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that CloseAsync removes the session from the registry and disposes it.</summary>
|
||||
/// <returns>A task that represents the asynchronous test operation.</returns>
|
||||
[Fact]
|
||||
public async Task CloseAsync_removes_and_disposes_session()
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ internal sealed class FakeBrowseSession : IBrowseSession
|
||||
/// <inheritdoc />
|
||||
public Guid Token { get; } = Guid.NewGuid();
|
||||
|
||||
/// <summary>Mutable so tests can rewind the timestamp into the reaper's eviction window.</summary>
|
||||
/// <inheritdoc />
|
||||
public DateTime LastUsedUtc { get; set; } = DateTime.UtcNow;
|
||||
|
||||
/// <summary>True once <see cref="DisposeAsync"/> has run to completion.</summary>
|
||||
@@ -40,7 +40,8 @@ internal sealed class FakeBrowseSession : IBrowseSession
|
||||
public Task<IReadOnlyList<AttributeInfo>> AttributesAsync(string nodeId, CancellationToken ct)
|
||||
=> AttributesHandler?.Invoke(nodeId, ct) ?? Task.FromResult<IReadOnlyList<AttributeInfo>>(Array.Empty<AttributeInfo>());
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>Disposes the fake browse session asynchronously, recording completion or throwing if configured.</summary>
|
||||
/// <returns>A completed value task.</returns>
|
||||
public ValueTask DisposeAsync()
|
||||
{
|
||||
if (ThrowOnDispose) throw new InvalidOperationException("dispose-failed");
|
||||
|
||||
Reference in New Issue
Block a user