public void PlayerOneWinsTwoGamesWithSecondGameGoingToAdvantage()
{
var game = new TennisGame1(new GameScore(player1Name, player2Name));
var pointsWon = new List <Point>
{
new Point(player1Name, "Fifteen-Love"),
new Point(player1Name, "Thirty-Love"),
new Point(player2Name, "Thirty-Fifteen"),
new Point(player2Name, "Thirty-All"),
new Point(player1Name, "Forty-Thirty"),
new Point(player1Name, "Love-All"),
new Point(player1Name, "Fifteen-Love"),
new Point(player2Name, "Fifteen-All"),
new Point(player1Name, "Thirty-Fifteen"),
new Point(player2Name, "Thirty-All"),
new Point(player2Name, "Thirty-Forty"),
new Point(player1Name, "Deuce"),
new Point(player1Name, "Advantage player1"),
new Point(player2Name, "Deuce"),
new Point(player1Name, "Advantage player1"),
new Point(player1Name, "Love-All"),
};
foreach (var pointWon in pointsWon)
{
game.WonPoint(pointWon.playerName);
Assert.AreEqual(pointWon.score, game.GetScore());
}
Assert.AreEqual(2, game.GetGamesWon(player1Name));
Assert.AreEqual(0, game.GetGamesWon(player2Name));
}