namespace MxGateway.Client.Tests; public sealed class MxGatewayClientOptionsTests { /// Verifies that options with valid endpoint and API key pass validation. [Fact] public void Validate_WithAbsoluteEndpointAndApiKey_Succeeds() { var options = new MxGatewayClientOptions { Endpoint = new Uri("http://localhost:5000"), ApiKey = "test-api-key", }; options.Validate(); } /// Verifies that empty API key causes validation to fail. [Fact] public void Validate_WithEmptyApiKey_Throws() { var options = new MxGatewayClientOptions { Endpoint = new Uri("http://localhost:5000"), ApiKey = "", }; Assert.Throws(options.Validate); } /// Verifies that invalid retry options cause validation to fail. [Fact] public void Validate_WithInvalidRetryOptions_Throws() { var options = new MxGatewayClientOptions { Endpoint = new Uri("http://localhost:5000"), ApiKey = "test-api-key", Retry = new MxGatewayClientRetryOptions { MaxAttempts = 0 }, }; Assert.Throws(options.Validate); } }