using ClaudeDo.Localization;

namespace ClaudeDo.Localization.Tests;

public class CultureResolverTests
{
    private static readonly string[] Codes = { "en", "de" };

    [Theory]
    [InlineData("de-DE", "de")]
    [InlineData("de", "de")]
    [InlineData("en-US", "en")]
    [InlineData("fr-FR", "en")]
    [InlineData("", "en")]
    public void Resolve_maps_culture_to_available_code(string culture, string expected)
    {
        Assert.Equal(expected, CultureResolver.Resolve(culture, Codes, fallback: "en"));
    }
}
