Ejemplo n.º 1
0
        public void ThirtyFifteen()
        {
            var tennis = new Tennis();
            var score  = tennis.Score(30, 15);

            Assert.AreEqual("Thirty Fifteen", score);
        }
Ejemplo n.º 2
0
        public void LoveFifteen()
        {
            var tennis = new Tennis();
            var score  = tennis.Score(0, 15);

            Assert.AreEqual("Love Fifteen", score);
        }
Ejemplo n.º 3
0
        public void ThirtyAll()
        {
            var tennis = new Tennis();
            var score  = tennis.Score(30, 30);

            Assert.AreEqual("Thirty All", score);
        }
Ejemplo n.º 4
0
        public void LoveAll()
        {
            var tennis = new Tennis();
            var score  = tennis.Score(0, 0);

            Assert.AreEqual("Love All", score);
        }
Ejemplo n.º 5
0
        public void FifteenThirty()
        {
            var tennis = new Tennis();
            var score  = tennis.Score(15, 30);

            Assert.AreEqual(15, 30);
        }
Ejemplo n.º 6
0
        public void FifteenLove()
        {
            var tennis = new Tennis();
            var score  = tennis.Score(15, 0);

            Assert.AreEqual("Fifteen Love", score);
        }
Ejemplo n.º 7
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.º 8
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.º 9
0
        public void FifteenAll()
        {
            var tennis = new Tennis();

            tennis.Score(15, 15);
        }