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:
@@ -10,6 +10,7 @@ public class DurationInputTests
|
||||
{
|
||||
// ── Split: TimeSpan -> (value, unit) ───────────────────────────────────
|
||||
|
||||
/// <summary>Verifies that splitting a null duration returns a blank value with the seconds unit.</summary>
|
||||
[Fact]
|
||||
public void Split_Null_ReturnsBlankWithSecondsUnit()
|
||||
{
|
||||
@@ -19,6 +20,7 @@ public class DurationInputTests
|
||||
Assert.Equal("sec", unit);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that splitting a zero duration returns a blank value.</summary>
|
||||
[Fact]
|
||||
public void Split_Zero_ReturnsBlank()
|
||||
{
|
||||
@@ -27,6 +29,7 @@ public class DurationInputTests
|
||||
Assert.Null(value);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a whole number of minutes splits into the minute unit.</summary>
|
||||
[Fact]
|
||||
public void Split_WholeMinutes_UsesMinuteUnit()
|
||||
{
|
||||
@@ -36,6 +39,7 @@ public class DurationInputTests
|
||||
Assert.Equal("min", unit);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a whole number of seconds splits into the second unit.</summary>
|
||||
[Fact]
|
||||
public void Split_WholeSeconds_UsesSecondUnit()
|
||||
{
|
||||
@@ -45,6 +49,7 @@ public class DurationInputTests
|
||||
Assert.Equal("sec", unit);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a sub-second duration splits into the millisecond unit.</summary>
|
||||
[Fact]
|
||||
public void Split_SubSecond_UsesMillisecondUnit()
|
||||
{
|
||||
@@ -56,32 +61,40 @@ public class DurationInputTests
|
||||
|
||||
// ── Compose: (value, unit) -> TimeSpan? ────────────────────────────────
|
||||
|
||||
/// <summary>Verifies that composing a blank value returns null.</summary>
|
||||
[Fact]
|
||||
public void Compose_Blank_ReturnsNull() =>
|
||||
Assert.Null(DurationInput.Compose(null, "sec"));
|
||||
|
||||
/// <summary>Verifies that composing a zero value returns null.</summary>
|
||||
[Fact]
|
||||
public void Compose_Zero_ReturnsNull() =>
|
||||
Assert.Null(DurationInput.Compose("0", "sec"));
|
||||
|
||||
/// <summary>Verifies that composing a negative value returns null.</summary>
|
||||
[Fact]
|
||||
public void Compose_Negative_ReturnsNull() =>
|
||||
Assert.Null(DurationInput.Compose("-5", "sec"));
|
||||
|
||||
/// <summary>Verifies that composing a seconds value builds the matching duration.</summary>
|
||||
[Fact]
|
||||
public void Compose_SecondsValue_BuildsDuration() =>
|
||||
Assert.Equal(TimeSpan.FromSeconds(30), DurationInput.Compose("30", "sec"));
|
||||
|
||||
/// <summary>Verifies that composing a minutes value builds the matching duration.</summary>
|
||||
[Fact]
|
||||
public void Compose_MinutesValue_BuildsDuration() =>
|
||||
Assert.Equal(TimeSpan.FromMinutes(5), DurationInput.Compose("5", "min"));
|
||||
|
||||
/// <summary>Verifies that composing a milliseconds value builds the matching duration.</summary>
|
||||
[Fact]
|
||||
public void Compose_MillisecondsValue_BuildsDuration() =>
|
||||
Assert.Equal(TimeSpan.FromMilliseconds(250), DurationInput.Compose("250", "ms"));
|
||||
|
||||
// ── Round-trip ─────────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>Verifies that splitting and then composing a duration preserves it.</summary>
|
||||
/// <param name="milliseconds">The duration in milliseconds.</param>
|
||||
[Theory]
|
||||
[InlineData(250)]
|
||||
[InlineData(30000)]
|
||||
|
||||
Reference in New Issue
Block a user