public void GetHighestScore_Player1_score_2_Player_score_0() { AddTwoPlayers(2, 0, "Player1", "Player2"); var gameScoreboard = new GameScoreBoard(_firstPlayer, _secondPlayer); var highestScorePlayer = gameScoreboard.GetHighestScorePlayer(); Assert.AreEqual(2, highestScorePlayer.Score); }
private static void GameResultShouldBe(string expected, TennisPlayer _firstPlayer, TennisPlayer _secondPlayer) { var gameScoreboard = new GameScoreBoard(_firstPlayer, _secondPlayer); // act var gameResult = gameScoreboard.GetGameResult(); // assert Assert.AreEqual(expected, gameResult); }
public void GetTennisResult_Player1_score_5_Player_score_4_Result_Player1_Deuce2() { AddTwoPlayers(3, 4, "Player1", "Player2"); var gameScoreboard = new GameScoreBoard(_firstPlayer, _secondPlayer); // Deuce1 var gameResult = gameScoreboard.GetGameResult(); _firstPlayer.Score = _firstPlayer.Score + 2; // Deuce2 gameResult = gameScoreboard.GetGameResult(); // assert Assert.AreEqual("Player1 Deuce2", gameResult); }