using Eis.Infrastructure.Candidate;

namespace Eis.Infrastructure.Tests.Candidate;

public sealed class RegionCatalogTests
{
    [Fact]
    public void ResolvesCodesFromEmbeddedAuthoritativeSnapshot()
    {
        var catalog = new RegionCatalog();

        var region = catalog.Resolve("320000", "320700", "320706");

        Assert.NotNull(region);
        Assert.Equal("江苏省", region.ProvinceName);
        Assert.Equal("连云港市", region.CityName);
        Assert.Equal("海州区", region.DistrictName);
        Assert.Null(catalog.Resolve("320000", "320700", "invalid"));
    }
}
