class resetTurns(unittest.TestCase):
    """ Test cases of resetTurns """
    def setUp(self):
        """ Build the Delegate for the test """
        self.min = 1
        self.max = 10

        self.delegate = MultiTurnRangeDelegate(self.min, self.max, None)

    def turnOn(self):
        """ Test that turnOn is reset """
        self.delegate.turnOn = 1
        self.delegate.resetTurns()
        assert self.delegate.turnOn == 0, "Turn On should be reset"

    def turns(self):
        """ Test that turns is reset to within the min and max """
        self.delegate.resetTurns()
        assert self.delegate.turns in range(
            self.min, self.max + 1), "Turns should be between max and min"
Ejemplo n.º 2
0
class resetTurns(unittest.TestCase):
    """ Test cases of resetTurns """

    def setUp(self):
        """ Build the Delegate for the test """
        self.min = 1
        self.max = 10

        self.delegate = MultiTurnRangeDelegate(self.min, self.max, None)

    def turnOn(self):
        """ Test that turnOn is reset """
        self.delegate.turnOn = 1
        self.delegate.resetTurns()
        assert self.delegate.turnOn == 0, "Turn On should be reset"

    def turns(self):
        """ Test that turns is reset to within the min and max """
        self.delegate.resetTurns()
        assert self.delegate.turns in range(self.min, self.max + 1), "Turns should be between max and min"
    def setUp(self):
        """ Build the Effect for the test """
        self.min = 1
        self.max = 1

        self.delegate = MultiTurnRangeDelegate(self.min, self.max, None)
Ejemplo n.º 4
0
    def setUp(self):
        """ Build the Delegate for the test """
        self.min = 1
        self.max = 10

        self.delegate = MultiTurnRangeDelegate(self.min, self.max, None)