namespace ZB.MOM.WW.MxGateway.IntegrationTests; public sealed class LiveLdapFactAttribute : FactAttribute { public const string EnableVariableName = "MXGATEWAY_RUN_LIVE_LDAP_TESTS"; /// Initializes a live LDAP test fact that skips if LDAP tests are not enabled. public LiveLdapFactAttribute() { if (!Enabled) { Skip = $"Set {EnableVariableName}=1 to run live LDAP tests."; } } /// Gets a value indicating whether live LDAP tests are enabled. public static bool Enabled => IntegrationTestEnvironment.IsEnabled(EnableVariableName); }