using System; using ZB.MOM.WW.MxGateway.Worker.MxAccess; namespace ZB.MOM.WW.MxGateway.Worker.Tests.MxAccess; /// /// Unit tests for : the subtag-fallback /// path derives a deterministic GUID from the alarm reference, so identical /// references must collide and distinct references must not. /// public sealed class SyntheticAlarmGuidTests { /// Verifies the same reference yields the same GUID. [Fact] public void SameReference_SameGuid() => Assert.Equal(SyntheticAlarmGuid.ForReference("A.B.C"), SyntheticAlarmGuid.ForReference("A.B.C")); /// Verifies distinct references yield distinct GUIDs. [Fact] public void DifferentReference_DifferentGuid() => Assert.NotEqual(SyntheticAlarmGuid.ForReference("A.B.C"), SyntheticAlarmGuid.ForReference("A.B.D")); /// Verifies a reference produces a non-empty GUID. [Fact] public void Reference_ProducesNonEmptyGuid() => Assert.NotEqual(Guid.Empty, SyntheticAlarmGuid.ForReference("A.B.C")); }