PrintScore() public method

public PrintScore ( ) : string
return string
Ejemplo n.º 1
0
        private void Play(int ballsToPlayer1, int ballsToPlayer2, string expectedScore)
        {
            tennis = new Tennis();

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

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

            Assert.AreEqual(expectedScore, tennis.PrintScore());
        }
Ejemplo n.º 2
0
        private void Play(int ballsToPlayer1, int ballsToPlayer2, string expectedScore)
        {
            tennis = new Tennis();

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

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

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