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

            game.scores(Opponent(player));

            Assert.AreEqual("Deuce", game.scores(player));
        }
示例#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));
        }
示例#3
0
        public void PlayerGainAdvantageOnDeuce(Player player, string expected)
        {
            TennisGame game = new TennisGame(40, 40);

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

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