Ejemplo n.º 1
0
 public void Test_GameWith20ThrowsOf1_HasScoreTwenty()
 {
     var game = new BowlingGame();
     foreach (var one in Enumerable.Repeat(1, 20))
     {
         game.Throw(one);
     }
     Ashure.That(game.GetScore().Equals(20));
 }
Ejemplo n.º 2
0
 public void Test_PerfectGame_Scores300()
 {
     var game = new BowlingGame();
     foreach (var ten in Enumerable.Repeat(10, 12))
     {
         game.Throw(ten);
     }
     Ashure.That(game.GetScore().IsEqualTo(300));
 }
Ejemplo n.º 3
0
 public void Test_GameWithSingleThrowOfFive_HasScoreFive()
 {
     var game = new BowlingGame();
     game.Throw(5);
     Ashure.That(game.GetScore().Equals(5));
 }
Ejemplo n.º 4
0
 public void Test_GameWithNoThrows_HasScoreZero()
 {
     var game = new BowlingGame();
     Ashure.That(game.GetScore().Equals(0));
 }
Ejemplo n.º 5
0
 public void Test_Throwing21Fives_Scores150()
 {
     var game = new BowlingGame();
     foreach (var five in Enumerable.Repeat(5, 21))
     {
         game.Throw(five);
     }
     Ashure.That(game.GetScore().IsEqualTo(150));
 }