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); }
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); }
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)); }
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)); }
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)); }
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)); }