Example #1
0
  @Test
  public void testBadScoreEntered() {
    Scorer scorer = new Scorer();
    try {
      scorer.score("abd");
      fail("excepted NumberFormatException on bad input");
    } catch (NumberFormatException sucess) {

    }
  }
Example #2
0
 @Test
 public void testCaptureScore() {
   Scorer scorer = new Scorer();
   assertEquals(75, scorer.score("75"));
 }
Example #3
0
 @Test
 public void testIsValid() {
   Scorer scorer = new Scorer();
   assertTrue(scorer.isValid("75"));
   assertFalse(scorer.isValid("bd"));
 }