public void CanWinTwice() { IGame game = new Game(); game.BallWonByPlayer1(); game.BallWonByPlayer1(); Tuple<string,string> score = game.CheckScore(); Assert.IsTrue(score.Item1 == "30"); }
public void Player1ShouldAdvance() { IGame game = new Game(); game.BallWonByPlayer1(); game.BallWonByPlayer1(); game.BallWonByPlayer1(); game.BallWonByPlayer2(); game.BallWonByPlayer2(); game.BallWonByPlayer2(); game.BallWonByPlayer1(); Tuple<string, string> score = game.CheckScore(); Assert.IsTrue(score.Item1 == "Advance"); Assert.IsTrue(score.Item2 == ""); }
public void Player2ShouldWinTheGameAfterAdvance() { IGame game = new Game(); game.BallWonByPlayer1(); game.BallWonByPlayer1(); game.BallWonByPlayer1(); game.BallWonByPlayer2(); game.BallWonByPlayer2(); game.BallWonByPlayer2(); game.BallWonByPlayer2(); game.BallWonByPlayer2(); Tuple<string, string> score = game.CheckScore(); Assert.IsTrue(score.Item1 == ""); Assert.IsTrue(score.Item2 == "Winner"); }