using System.Linq;
using QuantEngine.Application.Services;
using Xunit;

namespace QuantEngine.Core.Tests;

public class MigrationBoundaryRegistryTests
{
    [Fact]
    public void RoutesContainCanonicalKeepAndMigrateEntries()
    {
        Assert.NotNull(MigrationBoundaryRegistry.Find("python_harness_validation"));
        Assert.NotNull(MigrationBoundaryRegistry.Find("dotnet_core_formula_engine"));
        Assert.NotNull(MigrationBoundaryRegistry.Find("dotnet_application_orchestration"));
        Assert.NotNull(MigrationBoundaryRegistry.Find("dotnet_web_scheduler"));
        Assert.NotNull(MigrationBoundaryRegistry.Find("dotnet_read_models"));

        var routes = MigrationBoundaryRegistry.Routes;
        Assert.Equal(4, routes.Count(r => r.Disposition == MigrationDisposition.Migrate));
        Assert.Equal(2, routes.Count(r => r.Disposition == MigrationDisposition.Keep));
    }
}
