Example #1
0
 public void When_Deuce_And_PlayerOne_Scores_And_PlayerTwo_Scores_Then_Game_Is_Not_Over()
 {
     TennisGame game = new TennisGame(Score.Forty, Score.Forty);
     game.GrantScoreTo(Player.One);
     game.GrantScoreTo(Player.Two);
     Assert.False(game.IsOver);
 }
Example #2
0
 public void When_Deuce_And_PlayerOne_Scores_Twice_Then_Game_Is_Over()
 {
     TennisGame game = new TennisGame(Score.Forty, Score.Forty);
     game.GrantScoreTo(Player.One);
     game.GrantScoreTo(Player.One);
     Assert.True(game.IsOver);
 }
Example #3
0
        public void When_Deuce_And_PlayerOne_Scores_And_PlayerTwo_Scores_Then_Game_Is_Not_Over()
        {
            TennisGame game = new TennisGame(Score.Forty, Score.Forty);

            game.GrantScoreTo(Player.One);
            game.GrantScoreTo(Player.Two);
            Assert.False(game.IsOver);
        }
Example #4
0
        public void When_Deuce_And_PlayerOne_Scores_Twice_Then_Game_Is_Over()
        {
            TennisGame game = new TennisGame(Score.Forty, Score.Forty);

            game.GrantScoreTo(Player.One);
            game.GrantScoreTo(Player.One);
            Assert.True(game.IsOver);
        }
Example #5
0
        public void When_Forty_Forty_And_PlayerOne_Scores_And_PlayerTwo_Scores_Then_Score_Is_Forty_Forty()
        {
            TennisGame game = new TennisGame(Score.Forty, Score.Forty);
            game.GrantScoreTo(Player.One);
            game.GrantScoreTo(Player.Two);

            Assert.Equal(Score.Forty, game.GetScoreOf(Player.One));
            Assert.Equal(Score.Forty, game.GetScoreOf(Player.Two));
        }
Example #6
0
        public void When_Forty_Forty_And_PlayerOne_Scores_And_PlayerTwo_Scores_Then_Score_Is_Forty_Forty()
        {
            TennisGame game = new TennisGame(Score.Forty, Score.Forty);

            game.GrantScoreTo(Player.One);
            game.GrantScoreTo(Player.Two);

            Assert.Equal(Score.Forty, game.GetScoreOf(Player.One));
            Assert.Equal(Score.Forty, game.GetScoreOf(Player.Two));
        }
Example #7
0
        public void When_Love_Forty_And_PlayerTwo_Scores_Then_PlayerTwo_Wins()
        {
            TennisGame game = new TennisGame(Score.Love, Score.Forty);
            game.GrantScoreTo(Player.Two);

            Assert.True(game.IsWinner(Player.Two));
        }
Example #8
0
        public void When_Forty_Love_And_PlayerOne_Scores_Then_PlayerOne_Wins()
        {
            TennisGame game = new TennisGame(Score.Forty, Score.Love);
            game.GrantScoreTo(Player.One);

            Assert.True(game.IsWinner(Player.One));
        }
Example #9
0
        public void When_Love_Love_And_PlayerTwo_Scores_Then_Theres_No_Winner()
        {
            TennisGame game = new TennisGame(Score.Love, Score.Love);
            game.GrantScoreTo(Player.Two);

            Assert.False(game.IsWinner(Player.Two));
            Assert.False(game.IsWinner(Player.One));
        }
Example #10
0
        public void When_Love_Forty_And_PlayerTwo_Scores_Then_PlayerTwo_Wins()
        {
            TennisGame game = new TennisGame(Score.Love, Score.Forty);

            game.GrantScoreTo(Player.Two);

            Assert.True(game.IsWinner(Player.Two));
        }
Example #11
0
        public void When_Forty_Love_And_PlayerOne_Scores_Then_PlayerOne_Wins()
        {
            TennisGame game = new TennisGame(Score.Forty, Score.Love);

            game.GrantScoreTo(Player.One);

            Assert.True(game.IsWinner(Player.One));
        }
Example #12
0
        public void When_Love_Love_And_PlayerTwo_Scores_Then_Theres_No_Winner()
        {
            TennisGame game = new TennisGame(Score.Love, Score.Love);

            game.GrantScoreTo(Player.Two);

            Assert.False(game.IsWinner(Player.Two));
            Assert.False(game.IsWinner(Player.One));
        }