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,12 +3,13 @@ using ZB.MOM.WW.ScadaBridge.Commons.Types.Debugging;
|
||||
namespace ZB.MOM.WW.ScadaBridge.Commons.Tests.Debugging;
|
||||
|
||||
/// <summary>
|
||||
/// Final review M1: the ONE parser behind the graph node's exception subtitle and the step
|
||||
/// The single parser behind the graph node's exception subtitle and the step
|
||||
/// detail panel's exception block. Before it, the panel showed the OUTERMOST exception of a
|
||||
/// wrapped chain while the node showed the innermost — the two now agree by construction.
|
||||
/// </summary>
|
||||
public class ExceptionHeaderTests
|
||||
{
|
||||
/// <summary>Verifies that a plain detail splits the type from the message and shortens the type only when asked.</summary>
|
||||
[Fact]
|
||||
public void Parse_PlainDetail_SplitsTypeFromMessage_AndShortensOnlyWhenAsked()
|
||||
{
|
||||
@@ -18,6 +19,7 @@ public class ExceptionHeaderTests
|
||||
Assert.Equal(("System.InvalidOperationException", "Recipe 42 rejected"), ExceptionHeader.Parse(detail, shortenType: false));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a wrapped exception chain resolves to the innermost exception.</summary>
|
||||
[Fact]
|
||||
public void Parse_WrappedChain_TakesTheINNERMOSTException()
|
||||
{
|
||||
@@ -28,6 +30,7 @@ public class ExceptionHeaderTests
|
||||
Assert.Equal(("C.Innermost", "the real one"), ExceptionHeader.Parse(detail, shortenType: false));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a generic type keeps its arity and arguments verbatim and only the head is shortened.</summary>
|
||||
[Fact]
|
||||
public void Parse_GenericType_KeepsTheArityAndArgumentsVerbatim_ShorteningOnlyTheHead()
|
||||
{
|
||||
@@ -37,6 +40,7 @@ public class ExceptionHeaderTests
|
||||
ExceptionHeader.Parse("RecipeException`1[System.String]: msg", shortenType: true));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the chain marker is matched after trimming, so a trailing marker is not treated as a chain.</summary>
|
||||
[Fact]
|
||||
public void Parse_ChainMarkerIsMatchedAfterTrimming_SoATrailingMarkerIsNotAChain()
|
||||
{
|
||||
@@ -46,12 +50,14 @@ public class ExceptionHeaderTests
|
||||
Assert.Equal(("Outer", "outer --->"), ExceptionHeader.Parse("A.Outer: outer ---> ", shortenType: true));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a line without a colon is treated as all type and no message.</summary>
|
||||
[Fact]
|
||||
public void Parse_LineWithoutAColon_IsAllTypeAndNoMessage()
|
||||
{
|
||||
Assert.Equal(("SomethingWentWrong", string.Empty), ExceptionHeader.Parse("SomethingWentWrong", shortenType: true));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a CRLF detail has the carriage return trimmed off the first line.</summary>
|
||||
[Fact]
|
||||
public void Parse_CrLfDetail_TrimsTheCarriageReturnOffTheFirstLine()
|
||||
{
|
||||
@@ -59,6 +65,8 @@ public class ExceptionHeaderTests
|
||||
ExceptionHeader.Parse("System.TimeoutException: took too long\r\n at X\r\n", shortenType: true));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a missing or blank detail returns null.</summary>
|
||||
/// <param name="detail">The exception detail text to parse.</param>
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
|
||||
Reference in New Issue
Block a user