Example #1
0
 public void Test_FourScoresPlayerOne_WinnerIsPlayerOne()
 {
     var game = new TennisGame();
     game.ScorePoint(TennisGame.PLAYER_A);
     game.ScorePoint(TennisGame.PLAYER_A);
     game.ScorePoint(TennisGame.PLAYER_A);
     game.ScorePoint(TennisGame.PLAYER_A);
     Ashure.That(game.GetWinner().Equals(TennisGame.PLAYER_A));
 }
Example #2
0
 public void Test_NotFinished_NoWinner()
 {
     var game = new TennisGame();
     game.ScorePoint(TennisGame.PLAYER_A);
     game.ScorePoint(TennisGame.PLAYER_A);
     game.ScorePoint(TennisGame.PLAYER_A);
     Ashure.That(game.GetWinner().HasValue.IsFalse());
 }