add shel
This commit is contained in:
@@ -23,6 +23,9 @@ public class PeopleDefTests
|
||||
Assert.Equal("Славянский", catalog.Label("ru", catalog.NameSets["Slavic"]));
|
||||
Assert.Equal("Slavic", catalog.Label("en", catalog.NameSets["Slavic"]));
|
||||
Assert.Equal("Усидчивый", catalog.Label("ru", catalog.Traits["Diligent"]));
|
||||
Assert.True(catalog.Subjects.ContainsKey("PrimarySchool"));
|
||||
Assert.Equal("Начальные классы", catalog.Label("ru", catalog.Subjects["PrimarySchool"]));
|
||||
Assert.Equal("Primary", catalog.Label("en", catalog.Subjects["PrimarySchool"]));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -147,6 +150,30 @@ public class PeopleDefTests
|
||||
Assert.Contains("Ghost", ex.Message);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Subject_UnknownSkill_FailsTheCatalog()
|
||||
{
|
||||
var ex = Assert.Throws<ContentLoadException>(() => _loader.Load(
|
||||
[CatalogLoader.CorePackId],
|
||||
[
|
||||
PackDocuments.Def(CatalogLoader.CorePackId, "skills", "math", """{ "defName": "Mathematics" }"""),
|
||||
PackDocuments.Def(
|
||||
CatalogLoader.CorePackId,
|
||||
"subjects",
|
||||
"ghost",
|
||||
"""
|
||||
{
|
||||
"defName": "GhostSubject",
|
||||
"grades": { "min": 1, "max": 4 },
|
||||
"hoursPerWeek": 2,
|
||||
"skills": [{ "skill": "Missing", "share": 1 }]
|
||||
}
|
||||
"""),
|
||||
]));
|
||||
|
||||
Assert.Contains("Missing", ex.Message);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OneWayIncompatibility_IsMutual()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user