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:
@@ -4,16 +4,17 @@ using ZB.MOM.WW.ScadaBridge.CentralUI.Components.Shared;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Shared;
|
||||
|
||||
/// <summary>
|
||||
/// Regression tests for HealthMonitoring-015. A heartbeat-only registered site has
|
||||
/// Regression tests for rendering a null timestamp. A heartbeat-only registered site has
|
||||
/// a <c>null</c> <c>LastReportReceivedAt</c> ("no full report yet"). The health
|
||||
/// dashboard passes that value straight into <see cref="TimestampDisplay"/>, so the
|
||||
/// component's <c>Value</c> must accept <c>DateTimeOffset?</c> and render a
|
||||
/// <c>null</c> as a human-readable placeholder ("never") instead of the
|
||||
/// <c>DateTimeOffset.MinValue</c> year-0001 sentinel. Non-null callers must keep
|
||||
/// <c>DateTimeOffset.MinValue</c> year 0001 sentinel. Non-null callers must keep
|
||||
/// rendering the formatted timestamp exactly as before.
|
||||
/// </summary>
|
||||
public class TimestampDisplayTests : BunitContext
|
||||
{
|
||||
/// <summary>Verifies that a non-null value renders as a formatted timestamp.</summary>
|
||||
[Fact]
|
||||
public void Render_NonNullValue_ShowsFormattedTimestamp()
|
||||
{
|
||||
@@ -28,6 +29,7 @@ public class TimestampDisplayTests : BunitContext
|
||||
Assert.Contains("2026-05-17 14:30:45 UTC", span.GetAttribute("title")!);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a null value renders the "never" placeholder.</summary>
|
||||
[Fact]
|
||||
public void Render_NullValue_ShowsNeverPlaceholder()
|
||||
{
|
||||
@@ -38,13 +40,14 @@ public class TimestampDisplayTests : BunitContext
|
||||
Assert.Contains("never", cut.Markup, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a null value does not render the year 0001 minimum-value sentinel.</summary>
|
||||
[Fact]
|
||||
public void Render_NullValue_DoesNotRenderYear0001Sentinel()
|
||||
{
|
||||
var cut = Render<TimestampDisplay>(parameters => parameters
|
||||
.Add(p => p.Value, (DateTimeOffset?)null));
|
||||
|
||||
// The year-0001 DateTimeOffset.MinValue sentinel must never reach the UI.
|
||||
// The year 0001 DateTimeOffset.MinValue sentinel must never reach the UI.
|
||||
Assert.DoesNotContain("0001", cut.Markup);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user