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

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