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:
+13
-5
@@ -5,7 +5,7 @@ using ZB.MOM.WW.ScadaBridge.Transport.Serialization;
|
||||
namespace ZB.MOM.WW.ScadaBridge.Transport.Tests.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Round-trip + forward-compat coverage for the M8 site/instance-scoped bundle
|
||||
/// Round-trip + forward-compat coverage for the site/instance-scoped bundle
|
||||
/// DTOs (<see cref="SiteDto"/>, <see cref="DataConnectionDto"/>,
|
||||
/// <see cref="InstanceDto"/> and the extended <see cref="BundleContentDto"/>).
|
||||
/// </summary>
|
||||
@@ -90,6 +90,7 @@ public sealed class BundleDtoSerializationTests
|
||||
},
|
||||
};
|
||||
|
||||
/// <summary>Verifies that full content round-trips with deep equality.</summary>
|
||||
[Fact]
|
||||
public void FullContent_RoundTrips_WithDeepEquality()
|
||||
{
|
||||
@@ -136,6 +137,7 @@ public sealed class BundleDtoSerializationTests
|
||||
Assert.Equal(original.Instances[0].ConnectionBindings[0], inst.ConnectionBindings[0]);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that enums serialize as strings for a human-readable wire format.</summary>
|
||||
[Fact]
|
||||
public void EnumsSerializeAsStrings_ForHumanReadableWire()
|
||||
{
|
||||
@@ -147,10 +149,11 @@ public sealed class BundleDtoSerializationTests
|
||||
Assert.Contains("\"Double\"", json, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that legacy content missing the new arrays deserializes to empty collections rather than null.</summary>
|
||||
[Fact]
|
||||
public void LegacyContent_MissingNewArrays_DeserializesToEmpty_NotNull()
|
||||
{
|
||||
// A pre-M8 bundle content blob: only the original central-config arrays
|
||||
// A legacy bundle content blob: only the original central-config arrays
|
||||
// are present; sites/dataConnections/instances fields are entirely absent
|
||||
// from the JSON text.
|
||||
const string legacyJson = """
|
||||
@@ -178,10 +181,11 @@ public sealed class BundleDtoSerializationTests
|
||||
Assert.Empty(content.Instances);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a default-constructed content has empty, non-null new arrays.</summary>
|
||||
[Fact]
|
||||
public void DefaultConstructed_NewArrays_AreEmpty_NotNull()
|
||||
{
|
||||
// Existing positional callers that never set the M8 members still get
|
||||
// Existing positional callers that never set the site/instance members still get
|
||||
// empty (not null) collections, so consumers can enumerate unconditionally.
|
||||
var content = new BundleContentDto(
|
||||
TemplateFolders: Array.Empty<TemplateFolderDto>(),
|
||||
@@ -201,7 +205,7 @@ public sealed class BundleDtoSerializationTests
|
||||
Assert.Empty(content.Instances);
|
||||
}
|
||||
|
||||
// --- arch-review 2026-08-19 P7-1: ExternalSystem TimeoutSeconds wire format ---
|
||||
// --- ExternalSystem TimeoutSeconds wire format ---
|
||||
|
||||
/// <summary>
|
||||
/// Pins the old-bundle semantics: a bundle written before <c>TimeoutSeconds</c>
|
||||
@@ -249,6 +253,7 @@ public sealed class BundleDtoSerializationTests
|
||||
|
||||
// --- S10: SMS recipient PhoneNumber + SmsConfig wire format ---------------
|
||||
|
||||
/// <summary>Verifies that a legacy recipient missing a phone number deserializes to null.</summary>
|
||||
[Fact]
|
||||
public void LegacyRecipient_MissingPhoneNumber_DeserializesToNull()
|
||||
{
|
||||
@@ -283,11 +288,12 @@ public sealed class BundleDtoSerializationTests
|
||||
Assert.Null(recipient.PhoneNumber);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that legacy content missing the SMS configs array deserializes to an empty collection rather than null.</summary>
|
||||
[Fact]
|
||||
public void LegacyContent_MissingSmsConfigsArray_DeserializesToEmpty_NotNull()
|
||||
{
|
||||
// A pre-SMS bundle has no smsConfigs field; the importer must see an empty
|
||||
// (never null) collection — same forward-compat invariant as the M8 arrays.
|
||||
// (never null) collection — same forward-compat invariant as the site/instance arrays.
|
||||
const string legacyJson = """
|
||||
{
|
||||
"TemplateFolders": [],
|
||||
@@ -308,6 +314,7 @@ public sealed class BundleDtoSerializationTests
|
||||
Assert.Empty(content.SmsConfigs);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a default-constructed content has an empty, non-null SMS configs collection.</summary>
|
||||
[Fact]
|
||||
public void DefaultConstructed_SmsConfigs_IsEmpty_NotNull()
|
||||
{
|
||||
@@ -325,6 +332,7 @@ public sealed class BundleDtoSerializationTests
|
||||
Assert.Empty(content.SmsConfigs);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the SMS config auth token rides the secrets block rather than cleartext public fields.</summary>
|
||||
[Fact]
|
||||
public void SmsConfig_AuthToken_RidesSecretsBlock_NotCleartextPublicFields()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user