namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip.IntegrationTests; /// /// Crosses every ab_server compose profile with both AbCip transports so each integration /// test runs once on libplctag and once on the native managed stack. The native run must be green /// wherever the libplctag run is. /// /// /// Every AbCip compose profile binds host :44818, so only one can run at a time. When /// AB_SERVER_COMPOSE_PROFILE is set, keeps only that profile, so the /// rows match the running container instead of driving, say, Micro800 semantics at a ControlLogix. /// Unset, every profile is crossed (the original behaviour). /// public static class TransportMatrix { /// Both transports, for tests that are not parameterised by profile. public static IReadOnlyList AllTransports { get; } = [AbCipTransport.Libplctag, AbCipTransport.Native]; /// Gets (profile, transport) rows for every selected profile × both transports. public static IEnumerable Profiles { get { var only = Environment.GetEnvironmentVariable("AB_SERVER_COMPOSE_PROFILE"); return from p in KnownProfiles.All where string.IsNullOrEmpty(only) || string.Equals(p.ComposeProfile, only, StringComparison.OrdinalIgnoreCase) from t in AllTransports select new object[] { p, t }; } } /// Gets one row per transport. public static IEnumerable Transports => AllTransports.Select(t => new object[] { t }); }