def test_strike_too_less_manna(self): wizard = Wizard('Merlin', 40, 12, 4) opponent = Wizard('Oz', 40, 10, 30) wizard.strike(opponent) self.assertEqual(wizard.manna, 4) self.assertEqual(opponent.hp, 36)
def test_strike_with_manna(self): wizard = Wizard("Merlin", 40, 10, 20) opponent = Wizard("Malfoy", 30, 5, 10) wizard.strike(opponent) self.assertEqual(wizard.manna, 15)
def test_strike_less_than_five_manna(self): wizard = Wizard("Merlin", 40, 9, 4) opponent = Wizard("opi", 40, 10, 20) wizard.strike(opponent) self.assertEqual(wizard.manna, 4) self.assertEqual(opponent.hp, 37)
def test_strike_manna_decrease(self): wizard = Wizard('Merlin', 40, 10, 20) opponent = Wizard('Oz', 40, 10, 30) wizard.strike(opponent) self.assertEqual(wizard.manna, 15)
def test_strike(self): wizard = Wizard("Merlin", 40, 2, 20) opponent = Wizard("Dumbledor", 10, 2, 10) wizard.strike(opponent) self.assertEqual(opponent.hp, 4)
def test_strike_4(self): wizard = Wizard("Harry", 40, 10, 25) opponent = Wizard("Hermioner", 9, 2, 10) wizard.strike(opponent) self.assertEqual(wizard.manna, 20)
def test_more_than_5_manna(self): wizard = Wizard("Test", 40, 10, 20) opponent = Wizard("Opponent", 40, 10, 20) self.assertEqual(wizard.manna, 15) wizard.strike(opponent) sels.assertEqual(opponent.hp, 0)
def test_strike_with_manna(self): wizard = Wizard('Merlin', 40, 10, 20) opponent = Wizard('Malfoy', 30, 5, 10) wizard.strike(opponent) self.assertEqual(opponent.hp, 0)
def test_strike_without_manna(self): wizard = Wizard('Merlin', 40, 9, 0) opponent = Wizard('Other', 30, 5, 10) wizard.strike(opponent) self.assertEqual(opponent.hp, 27)
def test_no_manna(self): wizard = Wizard("Test", 40, 10, 0) opponent = Wizard("Opponent", 40, 10, 20) wizard.strike(opponent) self.assertEqual(wizard.manna, 0)
def test_reduce_manna(self): wizard = Wizard('Merlin', 40, 10, 20) opponent = Wizard('Other', 30, 5, 10) wizard.strike(opponent) self.assertEqual(opponent.hp, 0)
def test_strike_with_manna(self): wizard = Wizard('Merlin', 40, 10, 20) opponent = Wizard('Other', 30, 5, 10) wizard.strike(opponent) self.assertEqual(wizard.manna, 15)
def test_strike_lowmanna(self): wizard = Wizard("Merlin", 40, 10, 20) opponent = Wizard("Saruman", 50, 9, 4) opponent.strike(wizard) self.assertEqual(wizard.hp, 37) self.assertEqual(opponent.manna, 4)
def test_strike_wo_mana(self): wizard = Wizard('GHAARRiYYY', 50, 30, 0) opponent = Wizard('VOLDERMORT', 100, 70, 20) wizard.strike(opponent) self.assertEqual(opponent.hp, 90)
def test_strike_without_manna(self): wizard = Wizard("Test", 40, 5, 0) opponent = Wizard("Opponent", 40, 10, 20) wizard.strike(opponent) self.assertEqual(opponent.hp, 27)
def test_without_manna(self): wizard = Wizard("Merlin", 40, 10, 20) opponent = Wizard("Other",30, 5, 20) wizard.strike(opponent) self.assertEqual(opponent.manna, 15)
def test_no_reduce_manna(self): wizard = Wizard('Merlin', 40, 10, 0) opponent = Wizard('Malfoy', 30, 5, 10) wizard.strike(opponent) self.assertEqual(wizard.manna, 0)
def test_strike_3(self): wizard = Wizard("Voldemort", 40, 10, 3) opponent = Wizard("Hermioner", 9, 2, 10) wizard.strike(opponent) self.assertEqual(wizard.manna, 3)
def test_strike_manna_week(self): wizard = Wizard('TestWizard', 100, 9, 4) enemy = Character('TestCharacter', 100, 10) wizard.strike(enemy) self.assertEqual(enemy.hp, 97)
def test_strike_five_manna(self): wizard = Wizard("Merlin", 40, 10, 20) opponent = Wizard("opi", 40, 10, 20) wizard.strike(opponent) self.assertEqual(wizard.manna, 15) self.assertEqual(opponent.hp, 10)
def test_strike_manna_strong(self): wizard = Wizard('TestWizard', 100, 10, 10) enemy = Character('TestCharacter', 100, 10) wizard.strike(enemy) self.assertEqual(enemy.hp, 70)
def test_strike_no_manna(self): wizard = Wizard('Merlin', 40, 10, 4) other = Wizard('Ursula', 40, 10, 20) wizard.strike(other) self.assertEqual(wizard.manna, 4) self.assertEqual(other.hp, 37)
def test_strike_manna_reduce(self): wizard = Wizard('Merlin', 40, 10, 6) enemy = Wizard('Oz', 50, 8, 5) wizard.strike(enemy) self.assertEqual(wizard.manna, 6-5)
def test_strike_triple_damage(self): wizard = Wizard('Merlin', 40, 10, 20) opponent = Wizard('Oz', 40, 10, 30) wizard.strike(opponent) self.assertEqual(wizard.manna, 15) self.assertEqual(opponent.hp, 10)
def test_strike_with_manna(self): wizard = Wizard('Merlin', 40, 10, 6) enemy = Wizard('Oz', 50, 8, 5) wizard.strike(enemy) self.assertEqual(wizard.manna, 6-5) self.assertEqual(enemy.hp, 50-3*10)
def test_strike_no_manna(self): wizard = Wizard('Merlin',100,10,0) opponent = Wizard('Gandalf',100,10,20) wizard.strike(opponent) self.assertEqual(wizard.manna,0) self.assertEqual(opponent.hp,97)
def test_strike_without_manna(self): wizard = Wizard('Merlin', 40, 9, 0) enemy = Wizard('Oz', 50, 8, 5) wizard.strike(enemy) self.assertEqual(wizard.manna, 0-0) self.assertEqual(enemy.hp, 50-9/3)
def test_strike(self): wizard = Wizard('HARYYRYR', 50, 50, 20) opponent = Wizard('Tom Denem', 100, 70, 20) wizard.strike(opponent) self.assertEqual(opponent.hp, -50)
def test_manna(self): wizard = Wizard('hafaprotter', 50, 50, 20) opponent = Wizard('VODLMER', 100, 70, 20) wizard.strike(opponent) self.assertEqual(wizard.manna, 15)
def test_strike_with_manna(self): wizard = Wizard("Merlin", 40, 9, 0) opponent = Wizard("Other", 30, 5, 20) wizard.strike(opponent) self.assertEqual(opponent.hp, 27)