docs(tests): fix CommentChecker findings across tests/ — 13,392 → 0 (repo-wide scan clean)
Comment/XML-doc changes only: - add summaries to ~10k test methods, fixtures, fakes and helpers (+ <param> on theories, <returns> on async Task methods, <inheritdoc/> on interface implementations the checker can resolve) - strip ~2.6k project-tracking references (WP*, P*-*, row-NN, Task N, #NN, Component-0NN) from comments, keeping the explanatory text; reword false positives in comments only - real docs on fakes implementing BCL/library interfaces (IDisposable, ILogger, IOptionsMonitor, IAsyncLifetime) - reword the last 5 src/ false positives (CWE-1236, failures-1, year-0001, M365) Only non-comment edits: four one-line nested classes split across lines so members can carry docs. Build 0 errors / 0 warnings.
This commit is contained in:
@@ -13,7 +13,7 @@ using ApiKeyForm = ZB.MOM.WW.ScadaBridge.CentralUI.Components.Pages.Admin.ApiKey
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Admin;
|
||||
|
||||
/// <summary>
|
||||
/// Bundle D drill-in test (#23 M7-T12) for the API Keys edit page, re-wired for the
|
||||
/// Drill-in test for the API Keys edit page, re-wired for the
|
||||
/// inbound-API-key re-arch (C3) onto the <see cref="IInboundApiKeyAdmin"/> seam. The chip
|
||||
/// routes operators into the central Audit Log pre-filtered by Actor = key Name AND
|
||||
/// Channel = ApiInbound (no other channel uses the key name as actor, but the explicit
|
||||
@@ -25,6 +25,7 @@ public class ApiKeyFormAuditDrillinTests : BunitContext
|
||||
private readonly IInboundApiKeyAdmin _admin = Substitute.For<IInboundApiKeyAdmin>();
|
||||
private readonly IInboundApiRepository _repo = Substitute.For<IInboundApiRepository>();
|
||||
|
||||
/// <summary>Creates the test class and registers the stubbed services the page needs.</summary>
|
||||
public ApiKeyFormAuditDrillinTests()
|
||||
{
|
||||
Services.AddSingleton(_admin);
|
||||
@@ -50,6 +51,7 @@ public class ApiKeyFormAuditDrillinTests : BunitContext
|
||||
string keyId, string name, bool enabled = true, params string[] methods) =>
|
||||
new(keyId, name, enabled, methods, DateTimeOffset.UnixEpoch, null);
|
||||
|
||||
/// <summary>Verifies that the edit page has a recent audit activity link filtered by actor and the inbound API channel.</summary>
|
||||
[Fact]
|
||||
public void EditPage_HasRecentAuditActivityLink_WithActorAndApiInboundChannel()
|
||||
{
|
||||
@@ -72,6 +74,7 @@ public class ApiKeyFormAuditDrillinTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the create page has no recent audit activity link.</summary>
|
||||
[Fact]
|
||||
public void CreatePage_HasNoRecentAuditActivityLink()
|
||||
{
|
||||
@@ -86,6 +89,8 @@ public class ApiKeyFormAuditDrillinTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that creating a key with a method selected shows the one-time token and key id.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task CreatePage_WithMethodSelected_ShowsOneTimeTokenAndKeyId()
|
||||
{
|
||||
@@ -118,6 +123,8 @@ public class ApiKeyFormAuditDrillinTests : BunitContext
|
||||
Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that creating a key with no method selected shows a validation error and creates nothing.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task CreatePage_WithNoMethodSelected_ShowsValidationError_AndDoesNotCreate()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user