using System.Runtime.CompilerServices; namespace ZB.MOM.WW.ScadaBridge.CLI.Tests; /// /// Assembly-wide test setup. The command/contract tests drive the CLI against single-request /// fake servers (one accepted socket, or a stub handler that records "the" request), so they /// pin the CLI to HTTP Basic: with the default token mode every process's first call would be /// a POST /auth/token exchange those fakes do not model. The bearer exchange itself is /// covered by , which opts in explicitly through an /// isolated and is unaffected by this switch. /// internal static class CliTestAssemblySetup { #pragma warning disable CA2255 // ModuleInitializer in a test assembly is intentional. [ModuleInitializer] internal static void ForceBasicAuthForContractTests() #pragma warning restore CA2255 { Environment.SetEnvironmentVariable(ManagementHttpClient.AuthModeEnvVar, "basic"); } }