public void PlayerReturnToDeuceOnAdvantage(Player player) { TennisGame game = new TennisGame(40, 40); game.scores(Opponent(player)); Assert.AreEqual("Deuce", game.scores(player)); }
public void GiveScoresTheResultShouldBeAsExpected(int score1, int score2, string expected) { // arrange TennisGame game = new TennisGame(score1, score2); // action Assert.AreEqual(expected, game.display()); }
public void WinOccursAfterChallenge(Player player) { TennisGame game = new TennisGame(40, 40); Assert.AreEqual("Player One Advantage", game.scores(player)); Assert.AreEqual("Deuce", game.scores(Opponent(player))); Assert.AreEqual("Player One Advantage", game.scores(player)); Assert.AreEqual("Player One Wins", game.scores(player)); }
public void PlayerWinsIfPlayerAlreadyScores40AndOtherPlayerIsNotAt40(Player player, string expected) { TennisGame game; if (player == Player.One) { game = new TennisGame(40, 0); } else { game = new TennisGame(0, 40); } Assert.AreEqual(expected, game.scores(player)); }
public void PlayerGainAdvantageOnDeuce(Player player, string expected) { TennisGame game = new TennisGame(40, 40); Assert.AreEqual(expected, game.scores(player)); }
public void ScoreShouldIncrementPlayerScore() { TennisGame game = new TennisGame(0, 0); Assert.AreEqual("Fifteen-Love", game.scores(Player.One)); }