public void PlayerOne_should_not_wins_on_less_than_5_scores() { var game = new TennisGame(); game.Win(game.PlayerOne); game.Win(game.PlayerOne); game.Win(game.PlayerOne); Assert.That(game.Finished, Is.False); }
public void PlayerOne_should_wins_on_5_scores() { var game = new TennisGame(); game.Win(game.PlayerOne); game.Win(game.PlayerOne); game.Win(game.PlayerOne); game.Win(game.PlayerOne); game.Win(game.PlayerOne); Assert.That(game.Finished, Is.True); }
public void Game_should_finished_with_2_wins_on_fouty_fouty() { var game = new TennisGame(); game.Win(game.PlayerOne); game.Win(game.PlayerTwo); game.Win(game.PlayerOne); game.Win(game.PlayerTwo); game.Win(game.PlayerOne); game.Win(game.PlayerTwo); game.Win(game.PlayerOne); game.Win(game.PlayerOne); Assert.That(game.PlayerOne.Points, Is.EqualTo(Points.Game)); Assert.That(game.Finished, Is.True); }
public void Game_should_swaped_advantage_and_game_should_not_finished_() { var game = new TennisGame(); game.Win(game.PlayerOne); game.Win(game.PlayerTwo); game.Win(game.PlayerOne); game.Win(game.PlayerTwo); game.Win(game.PlayerOne); game.Win(game.PlayerTwo); game.Win(game.PlayerOne); game.Win(game.PlayerTwo); game.Win(game.PlayerOne); game.Win(game.PlayerTwo); game.Win(game.PlayerOne); game.Win(game.PlayerTwo); Assert.That(game.PlayerOne.Points, Is.EqualTo(Points.Forty)); Assert.That(game.Finished, Is.False); }