AwardPointToPlayer2() public method

public AwardPointToPlayer2 ( ) : void
return void
示例#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());
        }