コード例 #1
0
ファイル: TennisGameTests.cs プロジェクト: punker76/CodeKatas
 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
ファイル: TennisGameTests.cs プロジェクト: punker76/CodeKatas
 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
ファイル: TennisScoreTests.cs プロジェクト: mhoyer/CodeKatas
        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
ファイル: TennisWinnerTests.cs プロジェクト: mhoyer/CodeKatas
        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
ファイル: TennisWinnerTests.cs プロジェクト: mhoyer/CodeKatas
        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
ファイル: TennisWinnerTests.cs プロジェクト: mhoyer/CodeKatas
        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));
        }