예제 #1
0
 public void TwoRoll()
 {
     Player player = new Player();
     player.Roll(2);
     player.Roll(3);
     Assert.AreEqual(new Score(5), player.CalcScore());
 }
예제 #2
0
 public void Strike()
 {
     Player player = new Player();
     player.Roll(10);
     player.Roll(8);
     player.Roll(1);
     player.Roll(3);
     Assert.AreEqual(new Score(31), player.CalcScore());
 }
예제 #3
0
 public void Spare()
 {
     Player player = new Player();
     player.Roll(2);
     player.Roll(8);
     player.Roll(2);
     player.Roll(3);
     Assert.AreEqual(new Score(17), player.CalcScore());
 }
예제 #4
0
 public void Perfect()
 {
     Player player = new Player();
     for (int i = 0; i < 12; i++) player.Roll(10);
     Assert.AreEqual(new Score(300), player.CalcScore());
 }
예제 #5
0
 public void ErrorOneRoll()
 {
     Player player = new Player();
     player.Roll(-1);
 }
예제 #6
0
 public void ErrorFrameOver()
 {
     Player player = new Player();
     player.Roll(2);
     player.Roll(9);
 }