public void TestMagicNormalCast() { PlayerTestClass player = new PlayerTestClass(); int magic = player.getMagic(); player.modifyMagic(-1); magic = player.getMagic(); Assert.AreEqual(magic, 9); }
public void TestMagicCanNotGoOverTen() { PlayerTestClass player = new PlayerTestClass(); int magic = player.getMagic(); magic = player.modifyMagic(1); Assert.AreEqual(magic, 10); Assert.AreEqual(player.getMagic(), 10); }
public void TestOrbPickupAtZeroMagic() { PlayerTestClass player = new PlayerTestClass(); int magic = player.getMagic(); magic = player.modifyMagic(-10); Assert.AreEqual(player.getMagic(), 0); player.modifyMagic(1); Assert.AreEqual(player.getMagic(), 1); }
public void TestMagicCanNotGoBelowZero() { PlayerTestClass player = new PlayerTestClass(); int magic = player.getMagic(); magic = player.modifyMagic(-10); Assert.AreEqual(magic, 0); Assert.AreEqual(player.getMagic(), 0); magic = player.modifyMagic(-2); Assert.AreEqual(magic, -1); Assert.AreEqual(player.getMagic(), 0); }
public void TestPlayerCtor() { PlayerTestClass player = new PlayerTestClass(); Assert.AreEqual(100, player.getHealth()); Assert.AreEqual(10, player.getMagic()); Assert.IsTrue(player.alive); }