public void CharacterTakeDamageTest() { Hero myHero = new Hero("TestHero"); int myHealthPoint = myHero.ActualHitPoint; int damageTaken = DiceRoll.D10Roll(); myHero.TakeDamage(damageTaken); Assert.AreEqual(myHealthPoint - damageTaken, myHero.ActualHitPoint); }
public void RollD10() { int minRoll = 1; int maxRoll = 10; int actualRoll; actualRoll = DiceRoll.D10Roll(); Assert.IsTrue(minRoll <= actualRoll, "The actualCount was not greater than " + minRoll); Assert.IsTrue(actualRoll <= maxRoll, "The actualCount was not lower than " + maxRoll); }