Beispiel #1
0
        public void LoadsConfigurationInformationForSpellLists()
        {
            var configuration = @"---
class: foo
levels:
  0: [read stuff, do stuff]
  1: [kill, explosion]".ParseYaml();
            var spellList     = new SpellList(configuration);

            Assert.Equal(spellList.Class, "foo");
            Assert.Equal(1, spellList.GetHighestSpellLevel());
            AssertExtensions.EquivalentLists(new string[] { "read stuff", "do stuff" }, spellList.GetAllSpells(0));
            AssertExtensions.EquivalentLists(new string[] { "kill", "explosion" }, spellList.GetAllSpells(1));
            Assert.True(spellList.Matches("FOO"));
        }