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:
@@ -19,7 +19,7 @@ using SitesPage = ZB.MOM.WW.ScadaBridge.CentralUI.Components.Pages.Admin.Sites;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Admin;
|
||||
|
||||
/// <summary>
|
||||
/// Regression tests for CentralUI-012. The Sites page loaded all sites and then
|
||||
/// Regression tests for the Sites page N+1 query fix. The Sites page loaded all sites and then
|
||||
/// issued <c>GetDataConnectionsBySiteIdAsync</c> once per site (N+1 database
|
||||
/// round-trips on every load and post-delete refresh). The fix fetches all
|
||||
/// data connections in a single <c>GetAllDataConnectionsAsync</c> call and
|
||||
@@ -73,7 +73,10 @@ public class SitesPageTests : BunitContext
|
||||
private sealed class StubAuthStateProvider : AuthenticationStateProvider
|
||||
{
|
||||
private readonly AuthenticationState _state;
|
||||
/// <summary>Initializes a new instance of the <see cref="StubAuthStateProvider"/> class.</summary>
|
||||
/// <param name="state">The authentication state returned to callers.</param>
|
||||
public StubAuthStateProvider(AuthenticationState state) => _state = state;
|
||||
/// <inheritdoc />
|
||||
public override Task<AuthenticationState> GetAuthenticationStateAsync()
|
||||
=> Task.FromResult(_state);
|
||||
}
|
||||
@@ -105,6 +108,7 @@ public class SitesPageTests : BunitContext
|
||||
stale,
|
||||
unknown);
|
||||
|
||||
/// <summary>Verifies that loading data fetches all connections in one query rather than one query per site.</summary>
|
||||
[Fact]
|
||||
public void LoadData_FetchesAllConnectionsInOneQuery_NoPerSiteQueries()
|
||||
{
|
||||
@@ -122,6 +126,7 @@ public class SitesPageTests : BunitContext
|
||||
_siteRepo.DidNotReceive().GetDataConnectionsBySiteIdAsync(Arg.Any<int>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that loading data groups connections by site and renders them under their site.</summary>
|
||||
[Fact]
|
||||
public void LoadData_GroupsConnectionsBySite_AndRendersThem()
|
||||
{
|
||||
@@ -138,6 +143,7 @@ public class SitesPageTests : BunitContext
|
||||
Assert.Contains("beta-conn", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the artifact badge shows Current, Out of date or Never deployed according to the site's artifact state.</summary>
|
||||
[Fact]
|
||||
public void ArtifactBadge_ShowsCurrent_OutOfDate_NeverDeployed()
|
||||
{
|
||||
@@ -163,6 +169,7 @@ public class SitesPageTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the instance line shows the stale count out of the deployed count.</summary>
|
||||
[Fact]
|
||||
public void InstanceLine_ShowsStaleOfDeployed()
|
||||
{
|
||||
@@ -183,6 +190,7 @@ public class SitesPageTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the instance line uses the correct singular wording when exactly one instance is affected.</summary>
|
||||
[Fact]
|
||||
public void InstanceLine_PluralisesTheSingleInstanceCase()
|
||||
{
|
||||
@@ -204,6 +212,7 @@ public class SitesPageTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Re-check forces a refresh of the pending-updates snapshot.</summary>
|
||||
[Fact]
|
||||
public void Recheck_ForcesRefresh()
|
||||
{
|
||||
@@ -218,6 +227,7 @@ public class SitesPageTests : BunitContext
|
||||
_pendingUpdates.Received().GetAsync(true, Arg.Any<CancellationToken>()));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a failure loading sites skips the fleet-wide evaluation.</summary>
|
||||
[Fact]
|
||||
public void SiteLoadFailure_SkipsTheFleetEvaluation()
|
||||
{
|
||||
@@ -232,6 +242,7 @@ public class SitesPageTests : BunitContext
|
||||
_pendingUpdates.DidNotReceive().GetAsync(Arg.Any<bool>(), Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a failed re-check clears the stale as-of caption.</summary>
|
||||
[Fact]
|
||||
public void FailedRecheck_ClearsTheStaleAsOfCaption()
|
||||
{
|
||||
@@ -258,6 +269,7 @@ public class SitesPageTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a cache fault shows an unavailable state while the sites still render.</summary>
|
||||
[Fact]
|
||||
public void CacheFault_ShowsUnavailable_AndSitesStillRender()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user