class nextPhase(unittest.TestCase): """ Test cases of nextPhase """ def setUp(self): """ Build the Phases and Phase List for the test """ self.phase1 = Phase([]) self.phase2 = Phase([]) self.phaseList = PhaseList([self.phase1, self.phase2]) def properPhase(self): """ Test that the proper Phase is returned when given a Phase """ assert self.phaseList.nextPhase(self.phase1) == self.phase2, "The Second phase should be the next phase after the first phase" def noNextPhase(self): """ Test that None is returned when there is no next phase """ assert self.phaseList.nextPhase(self.phase2) is None, "There is no phase after the last phase"
def setUp(self): """ Build the Player and Phase List for the test """ self.match1 = NumberSet(1) self.match2 = NumberSet(1) self.phase1 = Phase([self.match1, self.match2]) self.phase2 = Phase([]) self.phaseList = PhaseList([self.phase1, self.phase2]) self.player = Player("", self.phaseList)
class nextPhase(unittest.TestCase): """ Test cases of nextPhase """ def setUp(self): """ Build the Phases and Phase List for the test """ self.phase1 = Phase([]) self.phase2 = Phase([]) self.phaseList = PhaseList([self.phase1, self.phase2]) def properPhase(self): """ Test that the proper Phase is returned when given a Phase """ assert self.phaseList.nextPhase( self.phase1 ) == self.phase2, "The Second phase should be the next phase after the first phase" def noNextPhase(self): """ Test that None is returned when there is no next phase """ assert self.phaseList.nextPhase( self.phase2) is None, "There is no phase after the last phase"
def setUp(self): """ Build the Player Round Wrapper for the test """ self.match1 = NumberSet(1) self.match2 = NumberSet(1) self.phase1 = Phase([self.match1, self.match2]) self.phase2 = Phase([]) self.phaseList = PhaseList([self.phase1, self.phase2]) self.player = Player("", self.phaseList) self.matchPileManager = MatchPileManager() self.hand = [NumberCard(1, None), NumberCard(2, None)] self.playerRoundWrapper = PlayerRoundWrapper(self.player, self.hand, self.matchPileManager)
def setUp(self): """ Build the Phases and Phase List for the test """ self.phase1 = Phase([]) self.phase2 = Phase([]) self.phaseList = PhaseList([self.phase1, self.phase2])
def __init__(self): """ Initialize Standard Phase List """ PhaseList.__init__(self, self.buildPhases())