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:
@@ -11,7 +11,7 @@ namespace ZB.MOM.WW.ScadaBridge.Communication.Tests;
|
||||
/// the canonical <see cref="AuditEvent"/> ↔ <see cref="AuditEventDto"/> (proto).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// C3 (Task 2.5): the canonical record carries the ScadaBridge domain fields inside
|
||||
/// The canonical record carries the ScadaBridge domain fields inside
|
||||
/// <c>DetailsJson</c>; the proto contract is unchanged (24-field wire). Domain fields
|
||||
/// are read back as typed properties via <c>AsRow()</c>. <c>ForwardState</c> is
|
||||
/// site-storage-only (never on the wire) and <c>IngestedAtUtc</c> is central-set
|
||||
@@ -19,6 +19,7 @@ namespace ZB.MOM.WW.ScadaBridge.Communication.Tests;
|
||||
/// </remarks>
|
||||
public class AuditEventDtoMapperTests
|
||||
{
|
||||
/// <summary>Verifies that a fully populated event survives a DTO round trip with every field preserved.</summary>
|
||||
[Fact]
|
||||
public void ToDto_FromDto_Roundtrip_FullyPopulated_PreservesAllFields()
|
||||
{
|
||||
@@ -88,6 +89,7 @@ public class AuditEventDtoMapperTests
|
||||
Assert.Null(rt.IngestedAtUtc);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that null string fields map to empty strings in the DTO.</summary>
|
||||
[Fact]
|
||||
public void ToDto_NullableStringFields_BecomeEmptyString()
|
||||
{
|
||||
@@ -115,6 +117,7 @@ public class AuditEventDtoMapperTests
|
||||
Assert.Equal(string.Empty, dto.Extra);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that empty strings in the DTO map back to null properties.</summary>
|
||||
[Fact]
|
||||
public void FromDto_EmptyString_BecomesNullProperty()
|
||||
{
|
||||
@@ -159,6 +162,7 @@ public class AuditEventDtoMapperTests
|
||||
Assert.Null(evt.Extra);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the occurrence timestamp keeps its UTC kind through mapping.</summary>
|
||||
[Fact]
|
||||
public void ToDto_OccurredAtUtc_PreservesUtcKind()
|
||||
{
|
||||
@@ -176,6 +180,7 @@ public class AuditEventDtoMapperTests
|
||||
Assert.Equal(occurredAt, roundTripped.OccurredAtUtc);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a null integer maps to a null wrapped Int32 value.</summary>
|
||||
[Fact]
|
||||
public void ToDto_NullableInt_BecomesNullInt32Value()
|
||||
{
|
||||
@@ -192,6 +197,7 @@ public class AuditEventDtoMapperTests
|
||||
Assert.Null(dto.DurationMs);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a null wrapped Int32 value maps back to a null property.</summary>
|
||||
[Fact]
|
||||
public void FromDto_NullInt32Value_BecomesNullProperty()
|
||||
{
|
||||
@@ -214,6 +220,7 @@ public class AuditEventDtoMapperTests
|
||||
Assert.Null(evt.DurationMs);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that enum values are stored in the DTO as their string names.</summary>
|
||||
[Fact]
|
||||
public void ToDto_EnumValues_StoredAsStringNames()
|
||||
{
|
||||
@@ -229,6 +236,7 @@ public class AuditEventDtoMapperTests
|
||||
Assert.Equal("Parked", dto.Status);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a DTO round trip preserves the source node.</summary>
|
||||
[Fact]
|
||||
public void AuditEventDto_round_trip_preserves_SourceNode()
|
||||
{
|
||||
@@ -249,6 +257,7 @@ public class AuditEventDtoMapperTests
|
||||
Assert.Equal("node-a", roundTripped.SourceNode);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a DTO round trip preserves a null source node.</summary>
|
||||
[Fact]
|
||||
public void AuditEventDto_round_trip_preserves_null_SourceNode()
|
||||
{
|
||||
@@ -270,7 +279,7 @@ public class AuditEventDtoMapperTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// C3 hardening (Task 2.5): a DTO that carries an unknown/renamed enum string
|
||||
/// Hardening: a DTO that carries an unknown/renamed enum string
|
||||
/// for Channel, Kind, or Status must NOT throw on <see cref="AuditEventDtoMapper.FromDto"/>;
|
||||
/// it degrades gracefully to the same fallbacks used by <c>AuditRowProjection.Decompose</c>
|
||||
/// (ApiInbound / InboundRequest / Submitted).
|
||||
|
||||
Reference in New Issue
Block a user