Пример #1
0
  @Test
  public void repair() {

    testingBook.setState(EBookState.DAMAGED);

    assertEquals(testingBook.getState(), EBookState.DAMAGED);
    testingBook.repair();
  }
Пример #2
0
 @Test
 public void testRepairBookNotDamaged() {
   testingBook.setState(EBookState.ON_LOAN);
   try {
     testingBook.repair();
     fail("Runtime Exception");
   } catch (RuntimeException e) {
     assertTrue(true);
   }
 }