Example #1
0
        public void NTest_item_use()
        {
            Dungeon a = new Dungeon(10, 1);
            Player  P = new Player();

            P.dungeon             = a;
            P.location            = a.startNode;
            a.startNode.contested = true;
            Item x = new HealingPotion("p1");

            x.use(P);

            Assert.Throws <ArgumentException>(() => x.use(P));
        }
Example #2
0
        public void Test_usePotion()
        {
            HealingPotion potion = new HealingPotion("0");
            Player        player = new Player();

            potion.use(player);

            Assert.AreEqual(potion.used, true);
        }