using Kbx.Shared.Integrations;
using Xunit;
namespace Kbx.Shared.Integrations.Tests;
public sealed class KbxIntegrationFailureClassifierTests
{
    [Theory]
    [InlineData(408)] [InlineData(429)] [InlineData(500)] [InlineData(503)]
    public void TransientHttpStatusesAreRetryable(int status) => Assert.Equal(KbxIntegrationFailureKind.Transient,KbxIntegrationFailureClassifier.ClassifyHttp(status));
    [Theory]
    [InlineData(400)] [InlineData(401)] [InlineData(403)] [InlineData(404)] [InlineData(422)]
    public void ClientOrDomainRejectionsArePermanent(int status) => Assert.Equal(KbxIntegrationFailureKind.Permanent,KbxIntegrationFailureClassifier.ClassifyHttp(status));
}
