using Kbx.Shared.Runtime;
using Xunit;

public sealed class KbxOperationPolicyTests
{
    [Theory]
    [InlineData("GET", false, true)]
    [InlineData("POST", false, false)]
    [InlineData("POST", true, true)]
    public void Mutation_retry_requires_idempotency(string method, bool key, bool expected)
        => Assert.Equal(expected, KbxOperationPolicy.CanRetryTransport(method, key));

    [Fact]
    public void Terminal_operation_is_not_treated_as_running()
        => Assert.True(KbxOperationPolicy.IsTerminal("partially-completed"));
}
