namespace HSchool.Content.Tests; public class VanillaCoreTests { [Fact] public void CoreDefaultMap_PassesValidation() { var root = Path.Combine(AppContext.BaseDirectory, "vanilla"); Assert.True(Directory.Exists(root), $"Vanilla core pack was not copied to {root}."); var documents = PackDocuments.FromDirectory(CatalogLoader.CorePackId, root); var catalog = new CatalogLoader().Load([CatalogLoader.CorePackId], documents); var map = CatalogLoader.LastDefaultMap([CatalogLoader.CorePackId], documents); Assert.NotNull(map); MapValidator.Validate(map, catalog); Assert.Equal("SchoolYard", catalog.Territories["SchoolYard"].DefName); Assert.True(catalog.Rooms["Corridor"].Slots.Count == 0); Assert.Equal(["Principal"], catalog.PositionsFor(DefKind.Room, "PrincipalsOffice")); Assert.Equal("Кабинет директора", catalog.Label("ru", catalog.Rooms["PrincipalsOffice"])); Assert.Equal("Principal's office", catalog.Label("en", catalog.Rooms["PrincipalsOffice"])); Assert.Equal(["Sit"], catalog.Things["DirectorsChair"].Actions); } }