Add Polly resilience policies
This commit is contained in:
@@ -25,4 +25,17 @@ public sealed class MxGatewayClientOptionsTests
|
||||
|
||||
Assert.Throws<ArgumentException>(options.Validate);
|
||||
}
|
||||
|
||||
[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<ArgumentOutOfRangeException>(options.Validate);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user