From b14a7cb8473591cb8ac10ac85c52120f18a8d177 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Wed, 15 Jul 2026 21:56:36 -0400 Subject: [PATCH] v3 batch1 gate: fix stale collision-error-code assertions (EquipmentSignalNameCollision -> UnsEffectiveNameCollision) in Configuration.Tests WP1 wrote these against its interim VirtualTag-only collision rule; WP4a replaced it with the broader UnsEffectiveNameCollision rule. Neither test-sweep scope covered these two Configuration.Tests files, so the assertions went stale. Configuration.Tests 107/107. --- .../DraftSnapshotFactoryTests.cs | 4 ++-- .../DraftValidatorTests.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Core/ZB.MOM.WW.OtOpcUa.Configuration.Tests/DraftSnapshotFactoryTests.cs b/tests/Core/ZB.MOM.WW.OtOpcUa.Configuration.Tests/DraftSnapshotFactoryTests.cs index 315671a6..9ad5806a 100644 --- a/tests/Core/ZB.MOM.WW.OtOpcUa.Configuration.Tests/DraftSnapshotFactoryTests.cs +++ b/tests/Core/ZB.MOM.WW.OtOpcUa.Configuration.Tests/DraftSnapshotFactoryTests.cs @@ -45,7 +45,7 @@ public sealed class DraftSnapshotFactoryTests : IDisposable snapshot.Tags.Count.ShouldBe(1); snapshot.VirtualTags.Count.ShouldBe(2); - DraftValidator.Validate(snapshot).ShouldContain(e => e.Code == "EquipmentSignalNameCollision"); + DraftValidator.Validate(snapshot).ShouldContain(e => e.Code == "UnsEffectiveNameCollision"); } /// Distinct VirtualTag names under the same equipment do not collide, so the snapshot @@ -62,7 +62,7 @@ public sealed class DraftSnapshotFactoryTests : IDisposable snapshot.Tags.Count.ShouldBe(1); snapshot.VirtualTags.Count.ShouldBe(1); - DraftValidator.Validate(snapshot).ShouldNotContain(e => e.Code == "EquipmentSignalNameCollision"); + DraftValidator.Validate(snapshot).ShouldNotContain(e => e.Code == "UnsEffectiveNameCollision"); } /// Seeds one active and one released reservation for the same equipment context; diff --git a/tests/Core/ZB.MOM.WW.OtOpcUa.Configuration.Tests/DraftValidatorTests.cs b/tests/Core/ZB.MOM.WW.OtOpcUa.Configuration.Tests/DraftValidatorTests.cs index deb977a4..adcf5dd8 100644 --- a/tests/Core/ZB.MOM.WW.OtOpcUa.Configuration.Tests/DraftValidatorTests.cs +++ b/tests/Core/ZB.MOM.WW.OtOpcUa.Configuration.Tests/DraftValidatorTests.cs @@ -168,7 +168,7 @@ public sealed class DraftValidatorTests } // ------------------------------------------------------------------------------------ - // ValidateNoEquipmentSignalNameCollision — v3: VirtualTag name uniqueness within equipment + // ValidateNoUnsEffectiveNameCollision — v3: VirtualTag name uniqueness within equipment // ------------------------------------------------------------------------------------ /// Two VirtualTags sharing (EquipmentId, Name) collide on a single OPC UA NodeId. @@ -185,7 +185,7 @@ public sealed class DraftValidatorTests ], }; - DraftValidator.Validate(draft).ShouldContain(e => e.Code == "EquipmentSignalNameCollision"); + DraftValidator.Validate(draft).ShouldContain(e => e.Code == "UnsEffectiveNameCollision"); } /// VirtualTags with the same name under DIFFERENT equipment do not collide. @@ -202,7 +202,7 @@ public sealed class DraftValidatorTests ], }; - DraftValidator.Validate(draft).ShouldNotContain(e => e.Code == "EquipmentSignalNameCollision"); + DraftValidator.Validate(draft).ShouldNotContain(e => e.Code == "UnsEffectiveNameCollision"); } private static VirtualTag BuildVirtualTag(string equipmentId, string name, string suffix = "") => new()