Example #1
0
class dodging(unittest.TestCase):
    """ Test that dodging returns the correct values """
    
    def setUp(self):
        """ Build Pkmn and Delegate for use in test cases """
        self.pkmn =  BuildPokemonBattleWrapper()
        self.delegate = HitDelegate(None, 100)
    
    def dodging(self):
        """ Test dodging function returns true correctly when the opp is dodging """
        self.pkmn.dodge = "DIG"
        assert self.delegate.dodging(self.pkmn), "Should be dodging"
        
    def notDodging(self):
        """ Test dodging function returns false when the opp is not dodging """
        self.pkmn.dodge = None
        assert not  self.delegate.dodging(self.pkmn), "Should not be dodging"