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,11 +4,12 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Shared;
|
||||
|
||||
/// <summary>
|
||||
/// Unit tests for the <see cref="PagerWindow"/> helper introduced for
|
||||
/// CentralUI-016 — windowed pagination that keeps the rendered button count
|
||||
/// windowed pagination that keeps the rendered button count
|
||||
/// bounded regardless of total page count.
|
||||
/// </summary>
|
||||
public class PagerWindowTests
|
||||
{
|
||||
/// <summary>Verifies that a small page count returns every page with no ellipsis.</summary>
|
||||
[Fact]
|
||||
public void Build_SmallPageCount_ReturnsEveryPage_NoEllipsis()
|
||||
{
|
||||
@@ -17,6 +18,7 @@ public class PagerWindowTests
|
||||
Assert.Equal(new[] { 1, 2, 3, 4, 5 }, pages);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a large page count yields a bounded window that includes the first and last pages.</summary>
|
||||
[Fact]
|
||||
public void Build_LargePageCount_IsBounded_AndIncludesFirstAndLast()
|
||||
{
|
||||
@@ -29,6 +31,7 @@ public class PagerWindowTests
|
||||
Assert.True(pages.Count <= 12, $"Expected a bounded window but got {pages.Count} entries.");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a large page count inserts an ellipsis for each gap in the window.</summary>
|
||||
[Fact]
|
||||
public void Build_LargePageCount_InsertsEllipsisForGaps()
|
||||
{
|
||||
@@ -38,6 +41,7 @@ public class PagerWindowTests
|
||||
Assert.Contains(0, pages);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a current page near the start produces no leading ellipsis.</summary>
|
||||
[Fact]
|
||||
public void Build_CurrentNearStart_NoLeadingEllipsis()
|
||||
{
|
||||
@@ -48,6 +52,7 @@ public class PagerWindowTests
|
||||
Assert.NotEqual(0, pages[1]);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an out-of-range current page is clamped into the valid range.</summary>
|
||||
[Fact]
|
||||
public void Build_ClampsOutOfRangeCurrentPage()
|
||||
{
|
||||
@@ -57,6 +62,8 @@ public class PagerWindowTests
|
||||
Assert.True(pages.Count <= 12);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a non-positive total page count returns an empty window.</summary>
|
||||
/// <param name="totalPages">The non-positive total page count under test.</param>
|
||||
[Theory]
|
||||
[InlineData(0)]
|
||||
[InlineData(-3)]
|
||||
|
||||
Reference in New Issue
Block a user