예제 #1
0
 public void CanWinTwice()
 {
     IGame game = new Game();
     game.BallWonByPlayer1();
     game.BallWonByPlayer1();
     Tuple<string,string> score = game.CheckScore();
     Assert.IsTrue(score.Item1 == "30");
 }
예제 #2
0
 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 == "");
 }
예제 #3
0
 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");
 }