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
-2
@@ -17,7 +17,7 @@ using SharedScriptFormPage = ZB.MOM.WW.ScadaBridge.CentralUI.Components.Pages.De
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Design;
|
||||
|
||||
/// <summary>
|
||||
/// Regression tests for arch-review P6-12. <c>ApiMethodForm</c> and
|
||||
/// Regression tests for the sandbox-run cancellation defect. <c>ApiMethodForm</c> and
|
||||
/// <c>SharedScriptForm</c> run a Test Run sandbox script via
|
||||
/// <c>AnalysisService.RunInSandboxAsync(request, _runCts.Token)</c> but — unlike
|
||||
/// <c>TemplateScriptDialog</c>, which cancels/disposes <c>_runCts</c> from an
|
||||
@@ -36,7 +36,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Design;
|
||||
/// requires <c>ScriptAnalysisService.RunInSandboxAsync</c> to be <c>virtual</c> —
|
||||
/// a test-only seam added alongside this fix (mirroring the pre-existing
|
||||
/// <c>virtual</c> on <c>DebugStreamService.StartStreamAsync</c>/<c>StopStream</c>),
|
||||
/// not itself part of the P6-12 defect or its fix.
|
||||
/// not itself part of the defect or its fix.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>Proof of failure:</b> stashing only the two <c>.razor</c> changes (leaving
|
||||
@@ -51,6 +51,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Design;
|
||||
/// </summary>
|
||||
public class ApiMethodFormSandboxDisposalTests : BunitContext
|
||||
{
|
||||
/// <summary>Initializes a new instance of <c>GatedScriptAnalysisService</c>.</summary>
|
||||
private (IRenderedComponent<ApiMethodFormPage> Cut, GatedScriptAnalysisService Sandbox) RenderPage()
|
||||
{
|
||||
// ApiMethodForm mounts a MonacoEditor unconditionally; let bUnit answer its
|
||||
@@ -99,6 +100,8 @@ public class ApiMethodFormSandboxDisposalTests : BunitContext
|
||||
typeof(ApiMethodFormPage).GetField(name, BindingFlags.Instance | BindingFlags.NonPublic)!
|
||||
.GetValue(page);
|
||||
|
||||
/// <summary>Verifies that dispose mid run cancels the sandbox run token.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Dispose_MidRun_CancelsTheSandboxRunToken()
|
||||
{
|
||||
@@ -124,6 +127,8 @@ public class ApiMethodFormSandboxDisposalTests : BunitContext
|
||||
await run.WaitAsync(TimeSpan.FromSeconds(5));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that dispose mid run continuation is a no op.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Dispose_MidRun_ContinuationIsANoOp()
|
||||
{
|
||||
@@ -198,6 +203,8 @@ public class SharedScriptFormSandboxDisposalTests : BunitContext
|
||||
typeof(SharedScriptFormPage).GetField(name, BindingFlags.Instance | BindingFlags.NonPublic)!
|
||||
.GetValue(page);
|
||||
|
||||
/// <summary>Verifies that dispose mid run cancels the sandbox run token.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Dispose_MidRun_CancelsTheSandboxRunToken()
|
||||
{
|
||||
@@ -220,6 +227,8 @@ public class SharedScriptFormSandboxDisposalTests : BunitContext
|
||||
await run.WaitAsync(TimeSpan.FromSeconds(5));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that dispose mid run continuation is a no op.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Dispose_MidRun_ContinuationIsANoOp()
|
||||
{
|
||||
@@ -260,6 +269,7 @@ internal sealed class GatedScriptAnalysisService : ScriptAnalysisService
|
||||
private readonly TaskCompletionSource _entered =
|
||||
new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
|
||||
/// <summary>Initializes a new instance of <c>GatedScriptAnalysisService</c>.</summary>
|
||||
public GatedScriptAnalysisService()
|
||||
: base(
|
||||
Substitute.For<ISharedScriptCatalog>(),
|
||||
@@ -278,6 +288,7 @@ internal sealed class GatedScriptAnalysisService : ScriptAnalysisService
|
||||
public void ReleaseRun() => _gate.TrySetResult(
|
||||
new SandboxRunResult(true, "1", "int", "", null, SandboxErrorKind.None, 1, null));
|
||||
|
||||
/// <inheritdoc />
|
||||
public override async Task<SandboxRunResult> RunInSandboxAsync(SandboxRunRequest request, CancellationToken ct)
|
||||
{
|
||||
LastToken = ct;
|
||||
|
||||
Reference in New Issue
Block a user