예제 #1
0
        private void Play(int ballsToPlayer1, int ballsToPlayer2, string expectedScore)
        {
            tennis = new CleanCode.Tennis();

            for (int i = 0; i < ballsToPlayer1; i++)
                tennis.AwardPointToPlayer1();

            for (int i = 0; i < ballsToPlayer2; i++)
                tennis.AwardPointToPlayer2();

            Assert.AreEqual(expectedScore, tennis.PrintScore());
        }
예제 #2
0
        private void Play(int ballsToPlayer1, int ballsToPlayer2, string expectedScore)
        {
            tennis = new CleanCode.Tennis();

            for (int i = 0; i < ballsToPlayer1; i++)
            {
                tennis.AwardPointToPlayer1();
            }

            for (int i = 0; i < ballsToPlayer2; i++)
            {
                tennis.AwardPointToPlayer2();
            }

            Assert.AreEqual(expectedScore, tennis.PrintScore());
        }