Exemplo n.º 1
0
        public void Points_won_returns_expected_score_string(int player1PointsWon, int player2PointsWon, string expected)
        {
            for (int i = 0; i < player1PointsWon; i++)
            {
                _gameScorer.ScorePlayer1();
            }

            for (int i = 0; i < player2PointsWon; i++)
            {
                _gameScorer.ScorePlayer2();
            }

            Assert.That(_scoreBuilder.ToString(), Is.EqualTo(expected));
        }
Exemplo n.º 2
0
        public void Player_score_corresponds_to_number_of_points_won(int pointsWon, int expectedScore)
        {
            for (int i = 0; i < pointsWon; i++)
            {
                _gameScorer.ScorePlayer1();
                _gameScorer.ScorePlayer2();
            }

            Assert.That(_gameScorer.Player1.Score, Is.EqualTo(expectedScore));
            Assert.That(_gameScorer.Player2.Score, Is.EqualTo(expectedScore));
        }