using ClaudeDo.Data.Models;

namespace ClaudeDo.Data.Tests;

public class ModelRegistryTests
{
    [Theory]
    [InlineData("sonnet", "sonnet")]
    [InlineData("OPUS", "opus")]
    [InlineData(" haiku ", "haiku")]
    public void NormalizeAlias_canonicalizes_known_aliases(string input, string expected)
    {
        Assert.Equal(expected, ModelRegistry.NormalizeAlias(input));
    }

    [Theory]
    [InlineData(null)]
    [InlineData("")]
    [InlineData("   ")]
    public void NormalizeAlias_blank_means_inherit(string? input)
    {
        Assert.Null(ModelRegistry.NormalizeAlias(input));
    }

    [Fact]
    public void NormalizeAlias_unknown_throws()
    {
        Assert.Throws<ArgumentException>(() => ModelRegistry.NormalizeAlias("gpt4"));
    }

    [Fact]
    public void ByCostAscending_is_haiku_sonnet_opus()
    {
        Assert.Equal(new[] { "haiku", "sonnet", "opus" }, ModelRegistry.ByCostAscending);
    }
}
