using System.Text.Json;
using SilverOS.Welcome.Core.Flavours;
using Xunit;

public class FlavourManifestTests
{
    [Fact]
    public void Deserializes_a_full_manifest()
    {
        var json = """
        {
          "id": "daily-driver", "label": "Daily-Driver",
          "description": "Balanced.", "isDefault": true,
          "hardening": { "modules": ["00","03","05"], "params": { "wdac": "audit" } },
          "appSet": ["SilverBrowser"], "settings": { "autoLock": 120 }
        }
        """;
        var m = JsonSerializer.Deserialize<FlavourManifest>(json, FlavourManifest.JsonOptions)!;
        Assert.Equal("daily-driver", m.Id);
        Assert.True(m.IsDefault);
        Assert.Equal(new[] { "00", "03", "05" }, m.Hardening.Modules);
        Assert.Equal("audit", m.Hardening.Params["wdac"]);
        Assert.Contains("SilverBrowser", m.AppSet);
    }
}
