public void TestInvisibility()
        {
            Spell spls = new Invisibility("David's dashing disappearance");

            //making sure string is right
            StringAssert.AreEqualIgnoringCase("David's dashing disappearance", spls.Name);
            //making sure right type of spell
            Assert.AreEqual(spls.Kind, SpellKind.Invisibility);
        }
        public void TestNameChange()
        {
            Spell spls = new Invisibility("David's dashing disappearance");

            StringAssert.AreEqualIgnoringCase("David's dashing disappearance", spls.Name);

            spls.Name = "Paul's dashing disappearance";

            StringAssert.AreEqualIgnoringCase("Paul's dashing disappearance", spls.Name);
        }
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            Spell[] spells = new Spell[5];
            spells [0] = new Teleport("Mitch's mighty mover");
            spells [1] = new Heal("Paul's potent poultice");
            spells [2] = new Invisibility("David's dashing disappearance");
            spells [3] = new Teleport("Stan's stunning shifter");
            spells [4] = new Heal("Lachlan's lavish longevity");

            CastAll(spells);
        }
        public void TestRemove()
        {
            SpellBook book = new SpellBook();
            Spell     s    = new Heal();

            book.AddSpell(s);
            Spell sp = new Invisibility("Magic pulse");

            book.AddSpell(sp);
            Assert.AreEqual(2, book.SpellCount);
            book.RemoveSpell(sp);
            Assert.AreEqual(1, book.SpellCount);
        }
        public void TestInvisibilityonce()
        {
            Invisibility spls = new Invisibility("David's dashing disappearance");

            Assert.AreEqual(false, spls.WasCast);

            spls.Cast(spls);

            Assert.AreEqual("Player casts Invisibility", spls.Result);

            Assert.AreEqual(true, spls.WasCast);

            spls.Cast(spls);

            Assert.AreEqual("pzzzzit", spls.Result);
        }