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:
@@ -7,7 +7,7 @@ using ZB.MOM.WW.ScadaBridge.CentralUI.Services;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Design;
|
||||
|
||||
/// <summary>
|
||||
/// M9-T30: <c>ParameterValueForm</c> renders typed nested inputs for object and
|
||||
/// <c>ParameterValueForm</c> renders typed nested inputs for object and
|
||||
/// list parameters (replacing the raw-JSON textarea fallback), driven by the
|
||||
/// declared schema (with <c>{"$ref":"lib:Name"}</c> resolved via
|
||||
/// <see cref="ISchemaLibraryQueryService"/>), with per-field validation, and
|
||||
@@ -19,6 +19,7 @@ public class ParameterValueFormTests : BunitContext
|
||||
{
|
||||
private readonly ISchemaLibraryQueryService _library = Substitute.For<ISchemaLibraryQueryService>();
|
||||
|
||||
/// <summary>Initializes a new instance of the <c>ParameterValueFormTests</c> class.</summary>
|
||||
public ParameterValueFormTests()
|
||||
{
|
||||
// Default: empty library (no $ref entries). Individual tests override.
|
||||
@@ -56,6 +57,7 @@ public class ParameterValueFormTests : BunitContext
|
||||
}
|
||||
""";
|
||||
|
||||
/// <summary>Verifies that an object parameter renders one input per field instead of a raw textarea.</summary>
|
||||
[Fact]
|
||||
public void ObjectParameter_RendersPerFieldInputs_NotRawTextarea()
|
||||
{
|
||||
@@ -78,6 +80,7 @@ public class ParameterValueFormTests : BunitContext
|
||||
Assert.Contains("name", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an object parameter round-trips to the canonical nested JSON shape.</summary>
|
||||
[Fact]
|
||||
public void ObjectParameter_RoundTripsToCanonicalNestedJsonShape()
|
||||
{
|
||||
@@ -101,6 +104,7 @@ public class ParameterValueFormTests : BunitContext
|
||||
Assert.Equal("widget", order["name"]);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a list parameter renders typed item rows with add and remove controls.</summary>
|
||||
[Fact]
|
||||
public void ListParameter_RendersAddRemoveTypedItemRows()
|
||||
{
|
||||
@@ -131,6 +135,7 @@ public class ParameterValueFormTests : BunitContext
|
||||
Assert.Empty(tagsAfter);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a parameter containing a reference renders the resolved shape.</summary>
|
||||
[Fact]
|
||||
public void RefBearingParameter_RendersResolvedShape()
|
||||
{
|
||||
@@ -169,6 +174,7 @@ public class ParameterValueFormTests : BunitContext
|
||||
Assert.Equal(2, cut.FindAll("input[type=text]").Count);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a per-field validation error is shown inline.</summary>
|
||||
[Fact]
|
||||
public void PerFieldValidationError_SurfacesInline()
|
||||
{
|
||||
@@ -185,7 +191,8 @@ public class ParameterValueFormTests : BunitContext
|
||||
Assert.NotEmpty(cut.FindAll(".text-danger"));
|
||||
}
|
||||
|
||||
// M1 — top-level $ref: empty-state guard must key off resolved fields, not _shapes
|
||||
// Top-level $ref: empty-state guard must key off resolved fields, not _shapes
|
||||
/// <summary>Verifies that a top-level reference resolving to an object renders its fields rather than an empty state.</summary>
|
||||
[Fact]
|
||||
public void TopLevelRef_ResolvesToObject_RendersFields_NotEmptyState()
|
||||
{
|
||||
@@ -228,6 +235,7 @@ public class ParameterValueFormTests : BunitContext
|
||||
// is cleared on invalid input, not the containing dict). This is the scenario the
|
||||
// ShiftDict fix is designed for: "rows[1].qty" → "rows[0].qty" when rows[0] is
|
||||
// removed, so the error/raw-text follows the item rather than being wiped.
|
||||
/// <summary>Verifies that removing a list item shifts the nested raw text of later items instead of wiping it.</summary>
|
||||
[Fact]
|
||||
public void ListItemRemoval_ShiftsNestedRawTextOfLaterItems_NotWiped()
|
||||
{
|
||||
@@ -283,6 +291,7 @@ public class ParameterValueFormTests : BunitContext
|
||||
Assert.NotEmpty(cut.FindAll(".text-danger"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the valid-changed callback reports false on a parse error and true once it is fixed.</summary>
|
||||
[Fact]
|
||||
public void ValidChanged_ReportsFalseOnAParseError_AndTrueOnceFixed()
|
||||
{
|
||||
@@ -298,6 +307,7 @@ public class ParameterValueFormTests : BunitContext
|
||||
Assert.True(valid.Last());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the valid-changed callback reports false on first render when a required field is empty.</summary>
|
||||
[Fact]
|
||||
public void ValidChanged_ReportsFalseOnFirstRender_WhenARequiredFieldIsEmpty()
|
||||
{
|
||||
@@ -315,6 +325,7 @@ public class ParameterValueFormTests : BunitContext
|
||||
Assert.Empty(cut.FindAll(".text-danger"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the valid-changed callback reports true on first render when nothing is required.</summary>
|
||||
[Fact]
|
||||
public void ValidChanged_ReportsTrueOnFirstRender_WhenNothingIsRequired()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user