コード例 #1
0
 def test_win_scissors_paper(self):
     """
     When: player one plays scissors, and player two plays paper.
     Then: the result should be a win - player ONE wins.
     """
     result = play_rock_paper_scissors(player_one_play=Symbol.SCISSORS,
                                       player_two_play=Symbol.PAPER)
     self.assertEqual(GameResponse.Result.WIN, result)
コード例 #2
0
 def test_loss_paper_scissors(self):
     """
     When: player one plays paper, and player two plays scissors.
     Then: the result should be a loss - player ONE loses.
     """
     result = play_rock_paper_scissors(player_one_play=Symbol.PAPER,
                                       player_two_play=Symbol.SCISSORS)
     self.assertEqual(GameResponse.Result.LOSS, result)
コード例 #3
0
 def test_tie_scissors_scissors(self):
     """
     When: both players play the same symbol - scissors.
     Then: the result should be a tie.
     """
     result = play_rock_paper_scissors(player_one_play=Symbol.SCISSORS,
                                       player_two_play=Symbol.SCISSORS)
     self.assertEqual(GameResponse.Result.TIE, result)