Example #1
2
        public void Deuce()
        {
            var game = new Game()
            .PlayerOneScores()
            .PlayerOneScores()
            .PlayerOneScores()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerTwoScores();

              Assert.AreEqual("deuce", game.GetAnnouncement());
        }
Example #2
0
        public void AdvantagePlayer2()
        {
            var game = new Game()
            .PlayerOneScores()
            .PlayerOneScores()
            .PlayerOneScores()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerTwoScores();

              Assert.AreEqual("advantage player 2", game.GetAnnouncement());
        }
Example #3
0
        public void BackToDeuceAfterPlayer2Advantage()
        {
            var game = new Game()
            .PlayerOneScores()
            .PlayerOneScores()
            .PlayerOneScores()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerOneScores();

              Assert.AreEqual("deuce", game.GetAnnouncement());
        }
Example #4
0
        public void Player1FirstScoreIs15()
        {
            var game = new Game().PlayerOneScores();

              Assert.AreEqual("15:0", game.GetAnnouncement());
        }
Example #5
0
        public void GameStartsWithZeroPoints()
        {
            var game = new Game();

              Assert.AreEqual("0:0", game.GetAnnouncement());
        }
Example #6
0
        public void Player2WinsStraight()
        {
            var game = new Game()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerTwoScores();

              Assert.AreEqual("player 2 wins", game.GetAnnouncement());
        }
Example #7
0
        public void Player2ThirdScoreIs40()
        {
            var game = new Game()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerTwoScores();

              Assert.AreEqual("0:40", game.GetAnnouncement());
        }
Example #8
0
        public void Player2WinsAfterAdvantage()
        {
            var game = new Game()
            .PlayerOneScores()
            .PlayerOneScores()
            .PlayerOneScores()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerTwoScores()
            .PlayerTwoScores();

              Assert.AreEqual("player 2 wins", game.GetAnnouncement());
        }
Example #9
0
        public void Player2SecondScoreIs30()
        {
            var game = new Game()
            .PlayerTwoScores()
            .PlayerTwoScores();

              Assert.AreEqual("0:30", game.GetAnnouncement());
        }
Example #10
0
        public void Player2FirstScoreIs15()
        {
            var game = new Game().PlayerTwoScores();

              Assert.AreEqual("0:15", game.GetAnnouncement());
        }
Example #11
0
        public void Player1ThirdScoreIs40()
        {
            var game = new Game()
            .PlayerOneScores()
            .PlayerOneScores()
            .PlayerOneScores();

              Assert.AreEqual("40:0", game.GetAnnouncement());
        }
Example #12
0
        public void Player1SecondScoreIs30()
        {
            var game = new Game()
            .PlayerOneScores()
            .PlayerOneScores();

              Assert.AreEqual("30:0", game.GetAnnouncement());
        }
Example #13
0
        public void Player1ScoreIsKeptWhenPlayer2Scores()
        {
            var game = new Game()
            .PlayerOneScores()
            .PlayerTwoScores();

              Assert.AreEqual("15:15", game.GetAnnouncement());
        }