using SilverOS.Welcome.Core.Flavours;
using Xunit;

public class ShippedFlavoursTests
{
    private static string FlavoursDir()
    {
        var d = AppContext.BaseDirectory;
        while (d is not null && !Directory.Exists(Path.Combine(d, "windows", "flavours")))
            d = Directory.GetParent(d)?.FullName;
        return Path.Combine(d!, "windows", "flavours");
    }

    [Fact]
    public void All_shipped_flavours_are_valid_and_one_is_default()
    {
        var loaded = new FlavourLoader().Load(FlavoursDir());
        Assert.Equal(4, loaded.Count);
        Assert.Equal("daily-driver", loaded[0].Id);
    }
}
