namespace ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.IntegrationTests; /// /// Crosses the PCCC compose profiles with both AbLegacy transports so each integration test runs /// once on libplctag and once on the native managed stack. /// /// /// Preserves the AB_LEGACY_COMPOSE_PROFILE filter the smoke theory always applied: when set, /// is narrowed to that profile before it is crossed with the /// transports, so the rows match the running container. /// public static class TransportMatrix { /// Both transports, for tests that are not parameterised by profile. public static IReadOnlyList AllTransports { get; } = [AbLegacyTransport.Libplctag, AbLegacyTransport.Native]; /// Gets (profile, transport) rows for every selected profile × both transports. public static IEnumerable Profiles { get { var only = Environment.GetEnvironmentVariable("AB_LEGACY_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 }); }