using StellaOps.Authority.Plugins.Abstractions;

namespace StellaOps.Authority.Plugins.Abstractions.Tests;

public class AuthorityPluginHealthResultTests
{
    [Fact]
    public void Healthy_ReturnsHealthyStatus()
    {
        var result = AuthorityPluginHealthResult.Healthy("ready");

        Assert.Equal(AuthorityPluginHealthStatus.Healthy, result.Status);
        Assert.Equal("ready", result.Message);
        Assert.NotNull(result.Details);
    }

    [Fact]
    public void Degraded_ReturnsDegradedStatus()
    {
        var result = AuthorityPluginHealthResult.Degraded("slow");

        Assert.Equal(AuthorityPluginHealthStatus.Degraded, result.Status);
    }

    [Fact]
    public void Unavailable_ReturnsUnavailableStatus()
    {
        var result = AuthorityPluginHealthResult.Unavailable("down");

        Assert.Equal(AuthorityPluginHealthStatus.Unavailable, result.Status);
    }
}
