public void CanCheckScore() { IGame game = new Game(); game.BallWonByPlayer1(); Tuple<string,string> score = game.CheckScore(); Assert.IsTrue(score.Item1 == "15"); }
public void CanWinTwicePlayer2() { IGame game = new Game(); game.BallWonByPlayer2(); game.BallWonByPlayer2(); Tuple<string,string> score = game.CheckScore(); Assert.IsTrue(score.Item2 == "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"); }
public void Player2ShouldScore() { IGame game = new Game(); game.BallWonByPlayer2(); Tuple<string,string> score = game.CheckScore(); Assert.IsTrue(score.Item2 == "15"); }