public void Given2Players_When_Player1MakesFourPointsDirectly_Then_ScoreIs_wins_player_one() { var game = new TennisGame(); game.MakesAPoint(Player.One); game.MakesAPoint(Player.One); game.MakesAPoint(Player.One); game.MakesAPoint(Player.One); Assert.That(game.Score(), Is.EqualTo("wins player one")); }
public void ScoreShouldBeDisplayedCorrectly(int p1Score, int p2Score, string expectedScore) { var game = new TennisGame("player1", "player2"); ScorePoints(game, "player1", p1Score); ScorePoints(game, "player2", p2Score); var actualScore = game.GetScore(); Assert.AreEqual(expectedScore, actualScore); }
public void Given2Players_When_Player1MakesThreePointsAndPlayer2MakesFourPointsAlternately_Then_ScoreIs_advantage_player_two() { var game = new TennisGame(); game.MakesAPoint(Player.One); game.MakesAPoint(Player.Two); game.MakesAPoint(Player.One); game.MakesAPoint(Player.Two); game.MakesAPoint(Player.One); game.MakesAPoint(Player.Two); game.MakesAPoint(Player.Two); Assert.That(game.Score(), Is.EqualTo("advantage player two")); }
public void Given2Players_When_Player1MakesFivePointsAndPlayer2MakesThreePointsAlternately_Then_ScoreIs_wins_player_one() { var game = new TennisGame(); game.MakesAPoint(Player.One); game.MakesAPoint(Player.Two); game.MakesAPoint(Player.One); game.MakesAPoint(Player.Two); game.MakesAPoint(Player.One); game.MakesAPoint(Player.Two); game.MakesAPoint(Player.One); game.MakesAPoint(Player.One); Assert.That(game.Score(), Is.EqualTo("wins player one")); }
public void Given2Players_When_Player1MakesThreePointsAndPlayer2MakesOnePoint_Then_ScoreIs_forty_fifteen() { var game = new TennisGame(); game.MakesAPoint(Player.One); game.MakesAPoint(Player.One); game.MakesAPoint(Player.One); game.MakesAPoint(Player.Two); Assert.That(game.Score(), Is.EqualTo("forty-fifteen")); }
public void Given2Players_When_Player1MakesAPoint_Then_ScoreIs_fifteen_love() { var game = new TennisGame(); game.MakesAPoint(Player.One); Assert.That(game.Score(), Is.EqualTo("fifteen-love")); }
public void Given2Players_When_Player1MakesTwoPoints_Then_ScoreIs_thirty_love() { var game = new TennisGame(); game.MakesAPoint(Player.One); game.MakesAPoint(Player.One); Assert.That(game.Score(), Is.EqualTo("thirty-love")); }
public void Given2Players_When_Player1MakesThreePointsAndPlayer2MakesThreePoints_Then_ScoreIs_deuce() { var game = new TennisGame(); game.MakesAPoint(Player.One); game.MakesAPoint(Player.One); game.MakesAPoint(Player.One); game.MakesAPoint(Player.Two); game.MakesAPoint(Player.Two); game.MakesAPoint(Player.Two); Assert.That(game.Score(), Is.EqualTo("deuce")); }
public void Given2Players_When_GameIsStarting_Then_ScoreIs_love() { var game = new TennisGame(); Assert.That(game.Score(), Is.EqualTo("love")); }
public void setup() { guiMock = new Mock <ITennisGui>(); tennisGame = new TennisGame(guiMock.Object); }