namespace ZB.MOM.WW.MxGateway.IntegrationTests;

/// <summary>Marks an xUnit test as requiring installed MXAccess COM and live provider state.</summary>
public sealed class LiveMxAccessFactAttribute : FactAttribute
{
    /// <summary>Initializes the attribute, skipping the test unless the integration test environment variable is set.</summary>
    public LiveMxAccessFactAttribute()
    {
        if (!IntegrationTestEnvironment.LiveMxAccessTestsEnabled)
        {
            Skip = $"Set {IntegrationTestEnvironment.LiveMxAccessVariableName}=1 to run live MXAccess tests.";
        }
    }
}
