namespace ZB.MOM.WW.MxGateway.Tests.TestSupport;

/// <summary>
/// xUnit collection for tests that mutate <em>process-global</em> state (environment variables
/// read by <c>GatewayApplication.Build</c>, e.g. <c>Kestrel__Endpoints__…</c> and
/// <c>MxGateway__Tls__SelfSignedCertPath</c>). <c>DisableParallelization</c> keeps such a test from
/// running concurrently with any other collection: otherwise a parallel host-building test inherits
/// the mutated variables mid-run and the two race on the same generated-certificate file (on Windows,
/// "the process cannot access the file … because it is being used by another process"). Membership is
/// deliberately narrow — only add classes that set/clear real environment variables, not ones that
/// pass configuration through <c>Build([...])</c> command-line args.
/// </summary>
[CollectionDefinition(Name, DisableParallelization = true)]
public sealed class GlobalEnvironmentCollection
{
    /// <summary>The collection name applied via <c>[Collection(GlobalEnvironmentCollection.Name)]</c>.</summary>
    public const string Name = "GlobalEnvironmentMutation";
}
