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:
@@ -48,6 +48,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
return FlowGraphBuilder.Build(events);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that laying out the Delmia graph assigns the expected lanes and columns.</summary>
|
||||
[Fact]
|
||||
public void Layout_DelmiaGraph_AssignsExpectedLanesAndColumns()
|
||||
{
|
||||
@@ -79,6 +80,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal(FlowGraphView.ColumnOrigin + 7 * FlowGraphView.ColumnPitch + FlowGraphView.RightPad, layout.Width);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that independent sibling nodes in one lane never share a column.</summary>
|
||||
[Fact]
|
||||
public void Layout_IndependentSiblingsInOneLane_NeverShareAColumn()
|
||||
{
|
||||
@@ -102,6 +104,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal(siteCols.Distinct().Count(), siteCols.Count);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the selected node renders with the selected CSS class.</summary>
|
||||
[Fact]
|
||||
public void Render_SelectedNode_CarriesSelectedClass()
|
||||
{
|
||||
@@ -121,6 +124,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal("0", only.GetAttribute("tabindex"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that clicking a node raises the selection callback with its step.</summary>
|
||||
[Fact]
|
||||
public void Render_ClickingANode_RaisesOnSelectWithTheStep()
|
||||
{
|
||||
@@ -137,6 +141,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal(FlowStepKind.ScriptRun, picked!.Kind);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an empty graph renders the lanes and a no-steps note.</summary>
|
||||
[Fact]
|
||||
public void Render_EmptyGraph_ShowsLanesAndNoStepsNote()
|
||||
{
|
||||
@@ -150,6 +155,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Contains("External", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a prediction-only graph draws dashed predicted nodes and edges.</summary>
|
||||
[Fact]
|
||||
public void Render_PredictionOnly_DrawsDashedPredictedNodesAndEdges()
|
||||
{
|
||||
@@ -166,6 +172,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.DoesNotContain(nodes, n => n.ClassList.Contains("ghost"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a graph with a prediction greys out predicted nodes the run never produced.</summary>
|
||||
[Fact]
|
||||
public void Render_GraphWithPrediction_GreysPredictedNodesTheRunNeverProduced()
|
||||
{
|
||||
@@ -193,6 +200,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.True(int.Parse(ghost.GetAttribute("data-column")!) > realMax);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that when two route calls are predicted and only the second really ran, the overlay matches it by title and leaves the first as the ghost.</summary>
|
||||
[Fact]
|
||||
public void Overlay_TwoPredictedRouteCalls_RealSecondCallMatchesByTitle_FirstIsTheGhost()
|
||||
{
|
||||
@@ -217,6 +225,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal("A.X", ghost.Predicted?.Title);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that rendered coordinates stay culture-invariant under the German culture.</summary>
|
||||
[Fact]
|
||||
public void Render_UnderGermanCulture_CoordinatesStayInvariant()
|
||||
{
|
||||
@@ -245,6 +254,9 @@ public class FlowGraphViewTests : BunitContext
|
||||
|
||||
// ── Node text readability (2026-09-06): shared-prefix stripping, width-based clipping, tooltips ──
|
||||
|
||||
/// <summary>Verifies that the common dotted prefix factors out only a shared dotted head that leaves every tail non-empty.</summary>
|
||||
/// <param name="titles">The titles.</param>
|
||||
/// <param name="expected">The expected.</param>
|
||||
[Theory]
|
||||
[InlineData(new[] { "DelmiaReceiver.RecipeDownloadFlag", "DelmiaReceiver.RecipeProcessedFlag" }, "DelmiaReceiver.")]
|
||||
[InlineData(new[] { "A.B.C.X", "A.B.C.Y", "A.B.D.Z" }, "A.B.")]
|
||||
@@ -258,6 +270,9 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal(expected, FlowGraphView.CommonDottedPrefix(titles));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that wrap hints mark camel-case and separator boundaries.</summary>
|
||||
/// <param name="input">The input.</param>
|
||||
/// <param name="expected">The expected.</param>
|
||||
[Theory]
|
||||
[InlineData("DelmiaRecipeDownload", "Delmia\u200BRecipe\u200BDownload")]
|
||||
[InlineData("DelmiaSim01.ProcessRecipeDownload", "Delmia\u200BSim01.\u200BProcess\u200BRecipe\u200BDownload")]
|
||||
@@ -270,6 +285,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal(expected, FlowGraphView.WrapHints(input));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that stripping the prefix removes the shared head from the title and from each subtitle item.</summary>
|
||||
[Fact]
|
||||
public void StripPrefix_RemovesTheHeadFromTheTitleAndFromEachSubtitleItem()
|
||||
{
|
||||
@@ -280,6 +296,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal("kept", FlowGraphView.StripPrefix("kept", null));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the tags lane layout factors the shared dotted head into the gutter.</summary>
|
||||
[Fact]
|
||||
public void Layout_TagsLane_FactorsTheSharedDottedHeadIntoTheGutter()
|
||||
{
|
||||
@@ -296,6 +313,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal(wait.Title, wait.DisplayTitle);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that predicted-only nodes never get a lane prefix.</summary>
|
||||
[Fact]
|
||||
public void Layout_PredictedOnlyNodes_NeverGetALanePrefix()
|
||||
{
|
||||
@@ -307,6 +325,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.All(layout.LanePrefixes, p => Assert.Equal(string.Empty, p));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a node body renders as HTML in a foreign object with a stripped title and a full-text tooltip.</summary>
|
||||
[Fact]
|
||||
public void Render_NodeBodyIsHtmlInAForeignObject_WithStrippedTitleAndFullTextTooltip()
|
||||
{
|
||||
@@ -378,6 +397,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
return FlowGraphBuilder.Build(events);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that outbound steps land in the external lane with a target sublabel.</summary>
|
||||
[Fact]
|
||||
public void Layout_OutboundSteps_LandInTheExternalLane_WithATargetSublabel()
|
||||
{
|
||||
@@ -394,6 +414,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Single(layout.Edges, e => e.Spawn);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the external lane sublabel lists three targets and then switches to counts.</summary>
|
||||
[Fact]
|
||||
public void Layout_ExternalSublabel_ListsThreeTargetsThenCounts()
|
||||
{
|
||||
@@ -402,6 +423,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal("Delmia.AckRecipe · MesDb · Planners +1", layout.LaneSublabels[(int)FlowLane.External]);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an API call node renders an eyebrow and an OK pill with the sync mode.</summary>
|
||||
[Fact]
|
||||
public void Render_ApiCall_HasEyebrowAndOkPillWithSyncMode()
|
||||
{
|
||||
@@ -424,6 +446,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.NotNull(run.QuerySelector("[data-test='flow-node-subtitle']"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a pending cached call renders the pending class and pill.</summary>
|
||||
[Fact]
|
||||
public void Render_PendingCachedCall_HasPendingClassAndPill()
|
||||
{
|
||||
@@ -439,6 +462,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal(string.Empty, db.QuerySelector(".fg-duration")!.TextContent.Trim());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a parked notification renders the parked class and the submit-to-terminal duration.</summary>
|
||||
[Fact]
|
||||
public void Render_ParkedNotification_HasParkedClass_AndSubmitToTerminalDuration()
|
||||
{
|
||||
@@ -455,6 +479,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal("+9 s", notify.QuerySelector(".fg-duration")!.TextContent.Trim());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that async edges render dashed, and a spawn edge keeps its arrowhead and gets a bolt badge.</summary>
|
||||
[Fact]
|
||||
public void Render_AsyncEdgesAreDashedClass_SpawnEdgeKeepsAnArrowheadAndGetsABoltBadge()
|
||||
{
|
||||
@@ -487,6 +512,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.InRange(y, Math.Min(a.Y, b.Y) + FlowGraphView.NodeHeight / 2, Math.Max(a.Y, b.Y) + FlowGraphView.NodeHeight / 2);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the spawn badge point sits on the vertical run of each connector shape.</summary>
|
||||
[Fact]
|
||||
public void SpawnBadgePoint_SitsOnTheVerticalRunOfEachConnectorShape()
|
||||
{
|
||||
@@ -517,6 +543,10 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.InRange(ay, siteRun.Y + h, external.Y - FlowGraphView.LanePad / 2);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the outbound mode text drops the status the pill already carries and names the call mode.</summary>
|
||||
/// <param name="kind">The kind.</param>
|
||||
/// <param name="subtitle">The subtitle.</param>
|
||||
/// <param name="expected">The expected.</param>
|
||||
[Theory]
|
||||
[InlineData(FlowStepKind.ApiCall, "Delivered · sync", "sync")]
|
||||
[InlineData(FlowStepKind.ApiCall, "Failed · sync", "sync")]
|
||||
@@ -532,6 +562,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal(expected, FlowGraphView.OutboundMode(kind, subtitle));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that predicted outbound nodes render as ghosts without pills.</summary>
|
||||
[Fact]
|
||||
public void Render_PredictedOutboundNodes_AreGhostsWithoutPills()
|
||||
{
|
||||
@@ -551,6 +582,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal("API CALL", external[0].QuerySelector(".fg-eyebrow")!.TextContent.Trim());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a predicted async edge renders with the async class.</summary>
|
||||
[Fact]
|
||||
public void PredictedAsyncEdge_RendersWithAsyncClass()
|
||||
{
|
||||
@@ -584,6 +616,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
return new FlowGraph([step], [], false, false);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a step with no log lines renders no log badge.</summary>
|
||||
[Fact]
|
||||
public void Render_StepWithNoLogLines_HasNoLogBadge()
|
||||
{
|
||||
@@ -594,6 +627,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.NotNull(cut.Find("g[data-test='flow-node'] .fg-foot [data-test='flow-node-subtitle']"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a step with mixed log levels shows counts with the highest severity first and counts debug lines as info.</summary>
|
||||
[Fact]
|
||||
public void Render_StepWithMixedLevels_ShowsCountsHighestSeverityFirst_DebugCountedAsInfo()
|
||||
{
|
||||
@@ -610,6 +644,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal("1 error, 2 warnings, 4 info", badge.GetAttribute("title"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a step with only info lines shows a single faint count.</summary>
|
||||
[Fact]
|
||||
public void Render_StepWithOnlyInfoLines_ShowsASingleFaintCount()
|
||||
{
|
||||
@@ -622,6 +657,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal("2 info", badge.GetAttribute("title"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a failed step with error detail uses the exception type and message as its subtitle.</summary>
|
||||
[Fact]
|
||||
public void Render_FailedStepWithErrorDetail_SubtitleIsTheExceptionTypeAndMessage()
|
||||
{
|
||||
@@ -634,6 +670,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
cut.Find("[data-test='flow-node-subtitle']").TextContent.Trim());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a failed step without error detail falls back to the error message as its subtitle.</summary>
|
||||
[Fact]
|
||||
public void Render_FailedStepWithoutDetail_FallsBackToTheErrorMessage()
|
||||
{
|
||||
@@ -642,6 +679,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal("timed out talking to MesDb", cut.Find("[data-test='flow-node-subtitle']").TextContent.Trim());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an OK step carrying an error detail keeps its normal subtitle.</summary>
|
||||
[Fact]
|
||||
public void Render_OkStepWithAnErrorDetail_KeepsItsNormalSubtitle()
|
||||
{
|
||||
@@ -650,6 +688,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal("trigger: manual", cut.Find("[data-test='flow-node-subtitle']").TextContent.Trim());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that log counts fold levels case-insensitively and treat any unrecognized level as info.</summary>
|
||||
[Fact]
|
||||
public void LogCounts_FoldsLevelsCaseInsensitively_AndTreatsEverythingElseAsInfo()
|
||||
{
|
||||
@@ -660,6 +699,11 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal((2, 1, 3), FlowGraphView.LogCounts(step));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the exception subtitle parses the first line of the detail only for a failed step.</summary>
|
||||
/// <param name="outcome">The outcome.</param>
|
||||
/// <param name="detail">The detail.</param>
|
||||
/// <param name="message">The message.</param>
|
||||
/// <param name="expected">The expected.</param>
|
||||
[Theory]
|
||||
[InlineData(FlowStepOutcome.Failed, "System.InvalidOperationException: Recipe 42 rejected\n at X", "boom", "InvalidOperationException: Recipe 42 rejected")]
|
||||
[InlineData(FlowStepOutcome.TimedOut, "System.TimeoutException: took too long", "boom", "TimeoutException: took too long")]
|
||||
@@ -685,6 +729,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal(expected, FlowGraphView.ExceptionSubtitle(step));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the log title names only the non-zero levels, using singular and plural forms correctly.</summary>
|
||||
[Fact]
|
||||
public void LogTitle_NamesOnlyTheNonZeroLevels_WithSingularAndPlural()
|
||||
{
|
||||
@@ -695,6 +740,7 @@ public class FlowGraphViewTests : BunitContext
|
||||
Assert.Equal(string.Empty, FlowGraphView.LogTitle((0, 0, 0)));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an outbound node with log lines shows both the pill and the log badge in its footer.</summary>
|
||||
[Fact]
|
||||
public void Render_OutboundNodeWithLogLines_ShowsBothThePillAndTheBadgeInTheFooter()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user