Example #1
0
 @Test
 public void testOneSpare() throws Exception {
   rollSpare();
   g.roll(3);
   rollMany(17, 0);
   assertEquals(16, g.score());
 }
Example #2
0
 @Test
 public void testOneStrike() throws Exception {
   rollStrike();
   g.roll(3);
   g.roll(4);
   rollMany(16, 0);
   assertEquals(24, g.score());
 }
Example #3
0
 @Test
 public void testPerfectGame() throws Exception {
   rollMany(12, 10);
   assertEquals(300, g.score());
 }
Example #4
0
 @Test
 public void testAllOnes() throws Exception {
   rollMany(20, 1);
   assertEquals(20, g.score());
 }
Example #5
0
 @Test
 public void testGutterGame() throws Exception {
   rollMany(20, 0);
   assertEquals(0, g.score());
 }