Ejemplo n.º 1
0
class isCharging(unittest.TestCase):
    """ Test that isCharging returns the correct values """
    def setUp(self):
        """ Grabs the message dictionary from StatModDelegate """
        self.environment = BattleEnvironment()
        self.pkmn = BuildPokemonBattleWrapper()
        self.delegate = ChargeDelegate(2, 0, "")
        
    def isCharging(self):
        """ Tests if isCharging returns correctly when it is charging """
        self.delegate.turnOn = 1
        assert self.delegate.isCharging(self.pkmn, self.environment), "Should be charging"
        
    def isNotCharging(self):
        """ Tests if isCharging returns correctly when it is not charging """
        self.delegate.turnOn = 0
        assert not self.delegate.isCharging(self.pkmn, self.environment), "Should not be charging"
Ejemplo n.º 2
0
class isCharging(unittest.TestCase):
    """ Test that isCharging returns the correct values """
    def setUp(self):
        """ Grabs the message dictionary from StatModDelegate """
        self.environment = BattleEnvironment()
        self.pkmn = BuildPokemonBattleWrapper()
        self.delegate = ChargeDelegate(2, 0, "")

    def isCharging(self):
        """ Tests if isCharging returns correctly when it is charging """
        self.delegate.turnOn = 1
        assert self.delegate.isCharging(self.pkmn,
                                        self.environment), "Should be charging"

    def isNotCharging(self):
        """ Tests if isCharging returns correctly when it is not charging """
        self.delegate.turnOn = 0
        assert not self.delegate.isCharging(
            self.pkmn, self.environment), "Should not be charging"
Ejemplo n.º 3
0
 def setUp(self):
     """ Grabs the message dictionary from StatModDelegate """
     self.environment = BattleEnvironment()
     self.pkmn = BuildPokemonBattleWrapper()
     self.delegate = ChargeDelegate(2, 0, "")
Ejemplo n.º 4
0
 def setUp(self):
     """ Grabs the message dictionary from StatModDelegate """
     self.environment = BattleEnvironment()
     self.pkmn = BuildPokemonBattleWrapper()
     self.delegate = ChargeDelegate(2, 0, "")