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:
@@ -3,7 +3,7 @@ using ZB.MOM.WW.ScadaBridge.CentralUI.Components;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Monitoring;
|
||||
|
||||
/// <summary>
|
||||
/// Regression tests for CentralUI-008. <c><input type="datetime-local"></c>
|
||||
/// Regression tests for the datetime-local conversion. <c><input type="datetime-local"></c>
|
||||
/// yields the value the user typed in their <i>browser-local</i> time zone. The
|
||||
/// audit-log filter converted it with <c>new DateTimeOffset(value, TimeSpan.Zero)</c>
|
||||
/// — relabelling the local wall-clock value as UTC, shifting the query window by
|
||||
@@ -12,12 +12,14 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Monitoring;
|
||||
/// </summary>
|
||||
public class BrowserTimeTests
|
||||
{
|
||||
/// <summary>Verifies that local input to utc, when null, returns null.</summary>
|
||||
[Fact]
|
||||
public void LocalInputToUtc_Null_ReturnsNull()
|
||||
{
|
||||
Assert.Null(BrowserTime.LocalInputToUtc(null, 0));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that local input to utc, when utc browser, leaves time unchanged.</summary>
|
||||
[Fact]
|
||||
public void LocalInputToUtc_UtcBrowser_LeavesTimeUnchanged()
|
||||
{
|
||||
@@ -29,6 +31,7 @@ public class BrowserTimeTests
|
||||
Assert.Equal(new DateTimeOffset(2026, 5, 16, 9, 30, 0, TimeSpan.Zero), utc);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that local input to utc, when positive utc offset browser, subtracts offset.</summary>
|
||||
[Fact]
|
||||
public void LocalInputToUtc_PositiveUtcOffsetBrowser_SubtractsOffset()
|
||||
{
|
||||
@@ -41,10 +44,11 @@ public class BrowserTimeTests
|
||||
Assert.Equal(new DateTimeOffset(2026, 5, 16, 7, 30, 0, TimeSpan.Zero), utc);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that local input to utc, when negative utc offset browser, adds offset.</summary>
|
||||
[Fact]
|
||||
public void LocalInputToUtc_NegativeUtcOffsetBrowser_AddsOffset()
|
||||
{
|
||||
// A browser at UTC-5 (US Eastern, standard time) reports getTimezoneOffset() == 300.
|
||||
// A browser at UTC minus 5 hours (US Eastern, standard time) reports getTimezoneOffset() == 300.
|
||||
// The user typing 09:30 local means 14:30 UTC.
|
||||
var local = new DateTime(2026, 5, 16, 9, 30, 0);
|
||||
|
||||
@@ -53,6 +57,7 @@ public class BrowserTimeTests
|
||||
Assert.Equal(new DateTimeOffset(2026, 5, 16, 14, 30, 0, TimeSpan.Zero), utc);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that local input to utc, when non utc browser, does not equal naive relabelling.</summary>
|
||||
[Fact]
|
||||
public void LocalInputToUtc_NonUtcBrowser_DoesNotEqualNaiveRelabelling()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user