class applyEffect(unittest.TestCase): """ Test cases of applyEffect """ def setUp(self): """ Build the Pkmn and Delegate for the test """ self.user = BuildPokemonBattleWrapper() self.target = BuildPokemonBattleWrapper() self.delegate = DodgeDelegate("DIG", "") def dodgeRemoved(self): """ Test that the dodge is removed when the attack's effect is applied """ self.delegate.applyEffect(self.user, self.target, None) assert self.user.dodge == None, "User should no longer be dodging"
class isCharging(unittest.TestCase): """ Test cases of isCharging """ def setUp(self): """ Build the Pkmn and Delegate for the test """ self.user = BuildPokemonBattleWrapper() self.environment = BattleEnvironment() self.dodgeType = "DIG" self.delegate = DodgeDelegate(self.dodgeType, "") def dodging(self): """ Test that the dodge is set to the delegate's dodge type """ assert self.user.dodge is None, "User should not be dodging" self.delegate.isCharging(self.user, self.environment) assert self.user.dodge == self.dodgeType, "User should get the delegate's dodge type"
def setUp(self): """ Build the Pkmn and Delegate for the test """ self.user = BuildPokemonBattleWrapper() self.target = BuildPokemonBattleWrapper() self.delegate = DodgeDelegate("DIG", "")
def setUp(self): """ Build the Pkmn and Delegate for the test """ self.user = BuildPokemonBattleWrapper() self.environment = BattleEnvironment() self.dodgeType = "DIG" self.delegate = DodgeDelegate(self.dodgeType, "")