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)); }
public void Test_usePotion() { HealingPotion potion = new HealingPotion("0"); Player player = new Player(); potion.use(player); Assert.AreEqual(potion.used, true); }