Ejemplo n.º 1
0
class afterTurn(unittest.TestCase):
    """ Test that afterTurn returns correctly """
    
    def setUp(self):
        """ Build the Pkmn and Heal """
        self.pkmn = BuildPokemonBattleWrapper()
        
        self.message = " hurt."
        self.heal = PeriodicHeal(self.message)
        
    def message(self):
        """ Test the message is correct """
        message = self.heal.afterTurn(self.pkmn)
        assert message == [self.pkmn.getHeader() + self.message], "Message should be the pokemon's name and the message given to the Heal."
Ejemplo n.º 2
0
class afterTurn(unittest.TestCase):
    """ Test that afterTurn returns correctly """
    def setUp(self):
        """ Build the Pkmn and Heal """
        self.pkmn = BuildPokemonBattleWrapper()

        self.message = " hurt."
        self.heal = PeriodicHeal(self.message)

    def message(self):
        """ Test the message is correct """
        message = self.heal.afterTurn(self.pkmn)
        assert message == [
            self.pkmn.getHeader() + self.message
        ], "Message should be the pokemon's name and the message given to the Heal."