Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }