Example #1
0
        public void PlayerReturnToDeuceOnAdvantage(Player player)
        {
            TennisGame game = new TennisGame(40, 40);

            game.scores(Opponent(player));

            Assert.AreEqual("Deuce", game.scores(player));
        }
Example #2
0
        public void WinOccursAfterChallenge(Player player)
        {
            TennisGame game = new TennisGame(40, 40);

            Assert.AreEqual("Player One Advantage", game.scores(player));
            Assert.AreEqual("Deuce", game.scores(Opponent(player)));
            Assert.AreEqual("Player One Advantage", game.scores(player));

            Assert.AreEqual("Player One Wins", game.scores(player));
        }
Example #3
0
        public void PlayerGainAdvantageOnDeuce(Player player, string expected)
        {
            TennisGame game = new TennisGame(40, 40);

            Assert.AreEqual(expected, game.scores(player));
        }
Example #4
0
        public void ScoreShouldIncrementPlayerScore()
        {
            TennisGame game = new TennisGame(0, 0);

            Assert.AreEqual("Fifteen-Love", game.scores(Player.One));
        }