29 lines
656 B
C#
29 lines
656 B
C#
namespace MxGateway.Client.Tests;
|
|
|
|
public sealed class MxGatewayClientOptionsTests
|
|
{
|
|
[Fact]
|
|
public void Validate_WithAbsoluteEndpointAndApiKey_Succeeds()
|
|
{
|
|
var options = new MxGatewayClientOptions
|
|
{
|
|
Endpoint = new Uri("http://localhost:5000"),
|
|
ApiKey = "test-api-key",
|
|
};
|
|
|
|
options.Validate();
|
|
}
|
|
|
|
[Fact]
|
|
public void Validate_WithEmptyApiKey_Throws()
|
|
{
|
|
var options = new MxGatewayClientOptions
|
|
{
|
|
Endpoint = new Uri("http://localhost:5000"),
|
|
ApiKey = "",
|
|
};
|
|
|
|
Assert.Throws<ArgumentException>(options.Validate);
|
|
}
|
|
}
|