Пример #1
0
        public void TestRemoveSpell()
        {
            SpellBook myBook = new SpellBook ();

            Spell mySpell1 = new Teleport ("Sean's Teleporter");
            Spell mySpell2 = new Heal ("Tom's Healer");
            Spell mySpell3 = new Invisibilty ("Ian's Invisibilty");

            myBook.AddSpell (mySpell1);
            myBook.AddSpell (mySpell2);
            myBook.AddSpell (mySpell3);

            Assert.AreEqual (3, myBook.SpellCount);

            myBook.RemoveSpell (mySpell2);

            Assert.AreEqual (2, myBook.SpellCount);
        }
Пример #2
0
        public void TestRemoveSpell()
        {
            SpellBook myBook = new SpellBook();

            Spell mySpell1 = new Teleport("Sean's Teleporter");
            Spell mySpell2 = new Heal("Tom's Healer");
            Spell mySpell3 = new Invisibilty("Ian's Invisibilty");

            myBook.AddSpell(mySpell1);
            myBook.AddSpell(mySpell2);
            myBook.AddSpell(mySpell3);

            Assert.AreEqual(3, myBook.SpellCount);

            myBook.RemoveSpell(mySpell2);

            Assert.AreEqual(2, myBook.SpellCount);
        }
Пример #3
0
        public void TestInvisibilityCast()
        {
            Spell s = new Invisibilty("Invisibility");

            StringAssert.IsMatch("Zippp... where am I?", s.Cast());
        }
Пример #4
0
        public void TestInvisibilityCast()
        {
            Spell s = new Invisibilty ("Invisibility");

            StringAssert.IsMatch ("Zippp... where am I?", s.Cast ());
        }