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:
+19
-1
@@ -7,7 +7,7 @@ using ZB.MOM.WW.ScadaBridge.TemplateEngine.Flattening;
|
||||
namespace ZB.MOM.WW.ScadaBridge.TemplateEngine.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Tests for the read-only authoring resolve service (M9/T26a). The resolved
|
||||
/// Tests for the read-only authoring resolve service. The resolved
|
||||
/// inherited member set MUST agree with what <see cref="FlatteningService"/>
|
||||
/// produces on deploy — the precedence is exercised both directly and via a
|
||||
/// cross-check against the flattener.
|
||||
@@ -29,6 +29,7 @@ public class TemplateInheritanceResolverTests
|
||||
|
||||
// ── (a) A→B→C chain: resolving C returns members inherited transitively from A ──
|
||||
|
||||
/// <summary>Verifies that a three-level chain includes a transitively inherited grandparent member.</summary>
|
||||
[Fact]
|
||||
public void Resolve_ThreeLevelChain_IncludesTransitivelyInheritedGrandparentMember()
|
||||
{
|
||||
@@ -62,6 +63,7 @@ public class TemplateInheritanceResolverTests
|
||||
|
||||
// ── (b) a base member ADDED to A after C was created appears in C's resolved set ──
|
||||
|
||||
/// <summary>Verifies that a base member added after the derived template was created appears in the resolved set.</summary>
|
||||
[Fact]
|
||||
public void Resolve_BaseMemberAddedAfterDerivedCreated_AppearsInResolvedSet()
|
||||
{
|
||||
@@ -86,6 +88,7 @@ public class TemplateInheritanceResolverTests
|
||||
|
||||
// ── (c) a locked member is flagged ──
|
||||
|
||||
/// <summary>Verifies that locked and base-locked members are flagged.</summary>
|
||||
[Fact]
|
||||
public void Resolve_LockedAndBaseLockedMembers_Flagged()
|
||||
{
|
||||
@@ -107,6 +110,7 @@ public class TemplateInheritanceResolverTests
|
||||
|
||||
// ── (d) own override wins over inherited ──
|
||||
|
||||
/// <summary>Verifies that an own override wins over an inherited member.</summary>
|
||||
[Fact]
|
||||
public void Resolve_OwnOverride_WinsOverInherited()
|
||||
{
|
||||
@@ -125,6 +129,7 @@ public class TemplateInheritanceResolverTests
|
||||
Assert.False(speed.IsInherited);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an inherited placeholder does not shadow the live base value.</summary>
|
||||
[Fact]
|
||||
public void Resolve_InheritedPlaceholder_DoesNotShadowLiveBaseValue()
|
||||
{
|
||||
@@ -146,6 +151,7 @@ public class TemplateInheritanceResolverTests
|
||||
|
||||
// ── (e) staleness summary true when stored rows differ; false when in sync ──
|
||||
|
||||
/// <summary>Verifies that the staleness summary is true when a base-added member is missing from the stored rows.</summary>
|
||||
[Fact]
|
||||
public void Resolve_StalenessSummary_TrueWhenBaseAddedMemberMissingFromStoredRows()
|
||||
{
|
||||
@@ -163,6 +169,7 @@ public class TemplateInheritanceResolverTests
|
||||
Assert.Equal(1, resolved.Staleness.DifferingMemberCount);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the staleness summary is false when the stored rows are in sync.</summary>
|
||||
[Fact]
|
||||
public void Resolve_StalenessSummary_FalseWhenStoredRowsInSync()
|
||||
{
|
||||
@@ -179,6 +186,7 @@ public class TemplateInheritanceResolverTests
|
||||
Assert.Equal(0, resolved.Staleness.DifferingMemberCount);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the staleness summary is true when a stored inherited value is stale.</summary>
|
||||
[Fact]
|
||||
public void Resolve_StalenessSummary_TrueWhenStoredInheritedValueIsStale()
|
||||
{
|
||||
@@ -196,6 +204,7 @@ public class TemplateInheritanceResolverTests
|
||||
|
||||
// ── (f) a composition-derived template resolves sanely ──
|
||||
|
||||
/// <summary>Verifies that a composition-derived template resolves its own and inherited members.</summary>
|
||||
[Fact]
|
||||
public void Resolve_CompositionDerivedTemplate_ResolvesOwnAndInheritedMembers()
|
||||
{
|
||||
@@ -216,6 +225,7 @@ public class TemplateInheritanceResolverTests
|
||||
Assert.Contains(resolved.Attributes, m => m.Name == "LocalTweak" && !m.IsInherited);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that resolving an unknown template returns an empty set.</summary>
|
||||
[Fact]
|
||||
public void Resolve_UnknownTemplate_ReturnsEmptySet()
|
||||
{
|
||||
@@ -226,6 +236,7 @@ public class TemplateInheritanceResolverTests
|
||||
|
||||
// ── Cross-member-type coverage: alarms, scripts, native alarm sources ──
|
||||
|
||||
/// <summary>Verifies that all member types are transitively inherited.</summary>
|
||||
[Fact]
|
||||
public void Resolve_AllMemberTypes_TransitivelyInherited()
|
||||
{
|
||||
@@ -250,6 +261,7 @@ public class TemplateInheritanceResolverTests
|
||||
// output for a no-override instance over the same chain. This is the
|
||||
// guarantee that the editor preview agrees with deploy. ──
|
||||
|
||||
/// <summary>Verifies that the resolver agrees with the flattening service for an instance with no overrides.</summary>
|
||||
[Fact]
|
||||
public void Resolve_AgreesWithFlatteningService_ForNoOverrideInstance()
|
||||
{
|
||||
@@ -295,6 +307,7 @@ public class TemplateInheritanceResolverTests
|
||||
// TriggerConfiguration MUST equal the FlatteningService-merged result for
|
||||
// a derived template that overrides only one setpoint (preview = deploy). ──
|
||||
|
||||
/// <summary>Verifies that the resolver agrees with the flattening service for a partial high/low override.</summary>
|
||||
[Fact]
|
||||
public void Resolve_AgreesWithFlatteningService_ForPartialHiLoOverride()
|
||||
{
|
||||
@@ -359,6 +372,7 @@ public class TemplateInheritanceResolverTests
|
||||
// must NOT attempt the per-setpoint merge (guard matches the flattener's
|
||||
// both-HiLo gate). Derived config must win verbatim (whole-replace). ──
|
||||
|
||||
/// <summary>Verifies that when the base is not high/low and the derived template is, the derived config wins verbatim.</summary>
|
||||
[Fact]
|
||||
public void Resolve_BaseNonHiLo_DerivedHiLo_DerivedConfigWinsVerbatim()
|
||||
{
|
||||
@@ -418,6 +432,7 @@ public class TemplateInheritanceResolverTests
|
||||
// ── I2: staleness must flag drift on the fields that actually matter, not
|
||||
// just one scalar per type. ──
|
||||
|
||||
/// <summary>Verifies that the staleness summary is true when a base alarm trigger config changed but the priority did not.</summary>
|
||||
[Fact]
|
||||
public void Resolve_StalenessSummary_TrueWhenBaseAlarmTriggerConfigChanged_PriorityUnchanged()
|
||||
{
|
||||
@@ -451,6 +466,7 @@ public class TemplateInheritanceResolverTests
|
||||
Assert.Equal(1, resolved.Staleness.DifferingMemberCount);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the staleness summary is true when a native source connection name changed but the source reference did not.</summary>
|
||||
[Fact]
|
||||
public void Resolve_StalenessSummary_TrueWhenNativeSourceConnectionNameChanged_SourceReferenceUnchanged()
|
||||
{
|
||||
@@ -481,6 +497,7 @@ public class TemplateInheritanceResolverTests
|
||||
Assert.Equal(1, resolved.Staleness.DifferingMemberCount);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the staleness summary is true when a native source condition filter changed but the source reference did not.</summary>
|
||||
[Fact]
|
||||
public void Resolve_StalenessSummary_TrueWhenNativeSourceConditionFilterChanged_SourceReferenceUnchanged()
|
||||
{
|
||||
@@ -511,6 +528,7 @@ public class TemplateInheritanceResolverTests
|
||||
Assert.Equal(1, resolved.Staleness.DifferingMemberCount);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the staleness summary is false when the alarm and native source are in sync.</summary>
|
||||
[Fact]
|
||||
public void Resolve_StalenessSummary_FalseWhenAlarmAndNativeSourceInSync()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user