Пример #1
0
        public void Game_Is_Tie_Validate()
        {
            var twoPlayers = new TwoPlayers();

            twoPlayers.Player1.Score(6);
            twoPlayers.Player1.Score(4);
            twoPlayers.Player1.PlayerOut();
            twoPlayers.Player2.Score(4);
            twoPlayers.Player2.Score(2);
            twoPlayers.Player2.Score(4);
            twoPlayers.Player2.PlayerOut();
            var winner = twoPlayers.Winner();

            Assert.AreEqual(winner, -1);
        }
Пример #2
0
        public void Player2_Wins_Validate()
        {
            var twoPlayers = new TwoPlayers();

            twoPlayers.Player1.Score(6);
            twoPlayers.Player1.Score(4);
            twoPlayers.Player1.PlayerOut();
            twoPlayers.Player2.Score(4);
            twoPlayers.Player2.Score(4);
            twoPlayers.Player2.Score(4);
            twoPlayers.Player2.PlayerOut();
            var winner = twoPlayers.Winner();

            Assert.AreEqual(winner, 2);
        }
 public void ThenPlayerIsTheWinner(int playerNumber)
 {
     _twoPlayers.Winner().Should().Be(playerNumber);
 }