using Shouldly; using Xunit; using ZB.MOM.WW.OtOpcUa.Driver.AbCip; namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip.IntegrationTests; /// /// Pure-unit tests for the profile catalog. Verifies /// stays in sync with + with the compose-file service /// names — a typo in either would surface as a test failure rather than a silent /// "wrong family booted" at runtime. Runs without Docker, so CI without the /// container still exercises these contracts. /// [Trait("Category", "Unit")] public sealed class AbServerProfileTests { [Theory] [InlineData(AbCipPlcFamily.ControlLogix, "controllogix")] [InlineData(AbCipPlcFamily.CompactLogix, "compactlogix")] [InlineData(AbCipPlcFamily.Micro800, "micro800")] [InlineData(AbCipPlcFamily.GuardLogix, "guardlogix")] public void KnownProfiles_ForFamily_Returns_Expected_ComposeProfile(AbCipPlcFamily family, string expected) { KnownProfiles.ForFamily(family).ComposeProfile.ShouldBe(expected); } [Fact] public void KnownProfiles_All_Covers_Every_Family() { var covered = KnownProfiles.All.Select(p => p.Family).ToHashSet(); foreach (var family in Enum.GetValues()) covered.ShouldContain(family, $"Family {family} is missing a KnownProfiles entry."); } [Fact] public void DefaultPort_Matches_EtherNetIP_Standard() { AbServerProfile.DefaultPort.ShouldBe(44818); } }