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:
+20
@@ -12,6 +12,7 @@ public class FlatteningServiceMergeTests
|
||||
{
|
||||
// ── MergeHiLoConfig ────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>Verifies that merging prefers derived keys while inherited keys that are not overridden survive.</summary>
|
||||
[Fact]
|
||||
public void MergeHiLoConfig_DerivedKeysWin_InheritedKeysSurvive()
|
||||
{
|
||||
@@ -29,6 +30,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Equal(100, doc.RootElement.GetProperty("hiHi").GetDouble()); // inherited
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a derived config can override the attribute name.</summary>
|
||||
[Fact]
|
||||
public void MergeHiLoConfig_DerivedCanOverrideAttribute()
|
||||
{
|
||||
@@ -42,6 +44,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Equal(50, doc.RootElement.GetProperty("hi").GetDouble());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that merging returns the inherited config when the derived config is null.</summary>
|
||||
[Fact]
|
||||
public void MergeHiLoConfig_DerivedNull_ReturnsInherited()
|
||||
{
|
||||
@@ -52,6 +55,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Equal(inherited, result);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that merging returns the derived config when the inherited config is null.</summary>
|
||||
[Fact]
|
||||
public void MergeHiLoConfig_InheritedNull_ReturnsDerived()
|
||||
{
|
||||
@@ -62,12 +66,14 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Equal(derived, result);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that merging returns null when both configs are null.</summary>
|
||||
[Fact]
|
||||
public void MergeHiLoConfig_BothNull_ReturnsNull()
|
||||
{
|
||||
Assert.Null(FlatteningService.MergeHiLoConfig(null, null));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that merging falls back to the derived config when the inherited config is malformed.</summary>
|
||||
[Fact]
|
||||
public void MergeHiLoConfig_MalformedInherited_FallsBackToDerived()
|
||||
{
|
||||
@@ -79,6 +85,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Equal(derived, result);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a new derived key is added while the remaining inherited keys are preserved.</summary>
|
||||
[Fact]
|
||||
public void MergeHiLoConfig_DerivedAddsNewKey_PreservesInheritedRest()
|
||||
{
|
||||
@@ -96,6 +103,7 @@ public class FlatteningServiceMergeTests
|
||||
|
||||
// ── DiffHiLoConfig ─────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>Verifies that diffing identical configs returns null.</summary>
|
||||
[Fact]
|
||||
public void DiffHiLoConfig_NoChanges_ReturnsNull()
|
||||
{
|
||||
@@ -103,6 +111,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Null(FlatteningService.DiffHiLoConfig(both, both));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that diffing returns only the key that changed.</summary>
|
||||
[Fact]
|
||||
public void DiffHiLoConfig_ChangedKey_ReturnsOnlyChangedKey()
|
||||
{
|
||||
@@ -118,6 +127,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Equal(90, prop.Value.GetDouble());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a newly added key appears in the diff.</summary>
|
||||
[Fact]
|
||||
public void DiffHiLoConfig_NewKey_AddedToDiff()
|
||||
{
|
||||
@@ -132,6 +142,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.False(doc.RootElement.TryGetProperty("hi", out _));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that diffing against a null inherited config returns the edited config verbatim.</summary>
|
||||
[Fact]
|
||||
public void DiffHiLoConfig_NullInherited_ReturnsEditedVerbatim()
|
||||
{
|
||||
@@ -139,12 +150,14 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Equal(edited, FlatteningService.DiffHiLoConfig(null, edited));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that diffing a null edited config returns null.</summary>
|
||||
[Fact]
|
||||
public void DiffHiLoConfig_NullEdited_ReturnsNull()
|
||||
{
|
||||
Assert.Null(FlatteningService.DiffHiLoConfig(@"{""hi"":80}", null));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that diffing ignores differences in string escaping.</summary>
|
||||
[Fact]
|
||||
public void DiffHiLoConfig_IgnoresStringEscapeDifferences()
|
||||
{
|
||||
@@ -158,6 +171,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Null(diff); // no real change once values are decoded
|
||||
}
|
||||
|
||||
/// <summary>Verifies that diffing ignores differences in numeric formatting.</summary>
|
||||
[Fact]
|
||||
public void DiffHiLoConfig_IgnoresNumericFormatDifferences()
|
||||
{
|
||||
@@ -167,6 +181,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Null(FlatteningService.DiffHiLoConfig(inherited, edited));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a diff merged back onto the inherited config reproduces the edited config.</summary>
|
||||
[Fact]
|
||||
public void DiffHiLoConfig_RoundTripsThroughMerge()
|
||||
{
|
||||
@@ -227,6 +242,7 @@ public class FlatteningServiceMergeTests
|
||||
return result.Value!;
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an instance alarm override merges its high/low setpoints into the flattened alarm.</summary>
|
||||
[Fact]
|
||||
public void Flatten_InstanceAlarmOverride_HiLo_MergesSetpoints()
|
||||
{
|
||||
@@ -250,6 +266,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Equal("Override", alarm.Source);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an instance alarm override replaces the alarm priority.</summary>
|
||||
[Fact]
|
||||
public void Flatten_InstanceAlarmOverride_OverridesPriority()
|
||||
{
|
||||
@@ -268,6 +285,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Equal("Override", alarm.Source);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an override targeting a locked alarm is silently ignored.</summary>
|
||||
[Fact]
|
||||
public void Flatten_InstanceAlarmOverride_LockedAlarm_OverrideSilentlyIgnored()
|
||||
{
|
||||
@@ -291,6 +309,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.Equal(80, doc.RootElement.GetProperty("hi").GetDouble()); // not overridden
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an override naming an unknown alarm has no effect.</summary>
|
||||
[Fact]
|
||||
public void Flatten_InstanceAlarmOverride_UnknownName_DoesNothing()
|
||||
{
|
||||
@@ -312,6 +331,7 @@ public class FlatteningServiceMergeTests
|
||||
Assert.NotEqual("Override", alarm.Source);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an override on a binary-trigger alarm replaces the whole trigger config.</summary>
|
||||
[Fact]
|
||||
public void Flatten_InstanceAlarmOverride_BinaryTrigger_ReplacesWholeConfig()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user