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

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

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

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

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

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

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

            tennis.Score(15, 15);
        }