public void TestThatEffectApplyEffectIsAppliedToDodge() { Character bob = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior"); var target = new Effect("dodge", 1, 1.0, true, bob); target.ApplyEffect(); Assert.AreEqual(target.GetCharacter().GetCharacterDodgeChance(), bob.GetCharacterDodgeChance()); }
public void TestThatCharacterHasZeroDodgeChance() { var target = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior"); target.DeductCharacterStat("dodgeChance", 10 * .04); Assert.AreEqual(target.GetCharacterDodgeChance(), 0); }
public void TestThatCharacterHasCorrectDodgeChanceAfterDeductingOverAll() { var target = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior"); target.DeductCharacterStat("dodgeChance", 11 * .04); Assert.AreEqual(target.GetCharacterDodgeChance(), 0); }
public void TestThatCharacterHasCorrectDodgeChance() { var target = new Character("Bob", null, 10, 10, 10, new Item(), "Warrior"); Assert.AreEqual(target.GetCharacterDodgeChance(), (10* 0.04)); }