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:
@@ -6,6 +6,7 @@ namespace ZB.MOM.WW.ScadaBridge.Transport.Tests.Import;
|
||||
|
||||
public sealed class LineDifferTests
|
||||
{
|
||||
/// <summary>Verifies that identical text produces no additions or removals and is not truncated.</summary>
|
||||
[Fact]
|
||||
public void IdenticalText_NoAddsOrRemoves_NotTruncated()
|
||||
{
|
||||
@@ -18,6 +19,7 @@ public sealed class LineDifferTests
|
||||
Assert.All(result.Lines, l => Assert.Equal(LineDiffOp.Context, l.Op));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that diffing an empty old text against three new lines yields three additions numbered 1 to 3.</summary>
|
||||
[Fact]
|
||||
public void OldEmpty_NewThreeLines_ThreeAdds_NewLineNos1To3()
|
||||
{
|
||||
@@ -34,6 +36,7 @@ public sealed class LineDifferTests
|
||||
Assert.All(adds, a => Assert.Null(a.OldLineNo));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that diffing two old lines against an empty new text yields two removals numbered 1 to 2.</summary>
|
||||
[Fact]
|
||||
public void NewEmpty_OldTwoLines_TwoRemoves_OldLineNos1To2()
|
||||
{
|
||||
@@ -50,6 +53,7 @@ public sealed class LineDifferTests
|
||||
Assert.All(removes, r => Assert.Null(r.NewLineNo));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that changing one middle line yields one removal and one addition with the surrounding context preserved.</summary>
|
||||
[Fact]
|
||||
public void SingleMiddleLineChange_OneRemoveOneAdd_ContextPreserved()
|
||||
{
|
||||
@@ -83,6 +87,7 @@ public sealed class LineDifferTests
|
||||
Assert.Equal(3, ctxC.NewLineNo);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that differing CRLF and LF line endings are normalised and produce no changes.</summary>
|
||||
[Fact]
|
||||
public void CrlfNormalization_NoChanges()
|
||||
{
|
||||
@@ -93,6 +98,7 @@ public sealed class LineDifferTests
|
||||
Assert.False(result.Truncated);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that lone carriage returns are normalised and produce no changes.</summary>
|
||||
[Fact]
|
||||
public void LoneCarriageReturnNormalization_NoChanges()
|
||||
{
|
||||
@@ -103,6 +109,7 @@ public sealed class LineDifferTests
|
||||
Assert.False(result.Truncated);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a null old text and a single new line yield one addition.</summary>
|
||||
[Fact]
|
||||
public void NullOld_NewSingleLine_OneAdd()
|
||||
{
|
||||
@@ -115,6 +122,7 @@ public sealed class LineDifferTests
|
||||
Assert.Equal(1, add.NewLineNo);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a null new text and a single old line yield one removal.</summary>
|
||||
[Fact]
|
||||
public void NullNew_OldSingleLine_OneRemove()
|
||||
{
|
||||
@@ -127,6 +135,7 @@ public sealed class LineDifferTests
|
||||
Assert.Equal(1, remove.OldLineNo);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that two null texts produce no changes.</summary>
|
||||
[Fact]
|
||||
public void BothNull_NoChanges()
|
||||
{
|
||||
@@ -137,6 +146,7 @@ public sealed class LineDifferTests
|
||||
Assert.False(result.Truncated);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a thousand new lines against an empty old text are truncated to the maximum line count.</summary>
|
||||
[Fact]
|
||||
public void SizeCap_OldEmpty_ThousandNewLines_TruncatedToMax()
|
||||
{
|
||||
@@ -150,6 +160,7 @@ public sealed class LineDifferTests
|
||||
Assert.Equal(0, result.RemovedCount);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an interleaved change preserves the longest-common-subsequence context.</summary>
|
||||
[Fact]
|
||||
public void InterleavedCase_LcsContextPreserved()
|
||||
{
|
||||
@@ -182,6 +193,7 @@ public sealed class LineDifferTests
|
||||
Assert.True(idxCtx1 < idxRem2 && idxRem2 < idxCtx3);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a trailing newline produces a trailing empty line.</summary>
|
||||
[Fact]
|
||||
public void TrailingNewline_ProducesTrailingEmptyLine()
|
||||
{
|
||||
@@ -192,6 +204,7 @@ public sealed class LineDifferTests
|
||||
Assert.Equal(0, result.RemovedCount);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that oversized inputs with no common lines degrade to a summary without running the Myers algorithm.</summary>
|
||||
[Fact]
|
||||
public void OversizedInputs_ZeroCommonLines_DegradesToSummary_WithoutRunningMyers()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user