Exemplo n.º 1
0
  @Test
  public void repair() {

    testingBook.setState(EBookState.DAMAGED);

    assertEquals(testingBook.getState(), EBookState.DAMAGED);
    testingBook.repair();
  }
Exemplo n.º 2
0
 @Test
 public void testRepairBookNotDamaged() {
   testingBook.setState(EBookState.ON_LOAN);
   try {
     testingBook.repair();
     fail("Runtime Exception");
   } catch (RuntimeException e) {
     assertTrue(true);
   }
 }