示例#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);
 }
示例#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);
 }
示例#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);
        }
示例#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);
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }