Exemplo n.º 1
0
 @Test
 public void testDisposeBookDamaged() {
   testingBook.setState(EBookState.DAMAGED);
   try {
     testingBook.dispose();
     fail("Runtime Exception");
   } catch (RuntimeException e) {
     assertTrue(true);
   }
 }
Exemplo n.º 2
0
 @Test
 public void testDisposeBookLost() {
   testingBook.setState(EBookState.LOST);
   try {
     testingBook.dispose();
     fail("Runtime Exception");
   } catch (RuntimeException e) {
     assertTrue(true);
   }
 }
Exemplo n.º 3
0
 @Test
 public void testDisposeBookAvailable() {
   testingBook.setState(EBookState.AVAILABLE);
   try {
     testingBook.dispose();
     fail("Runtime Exception");
   } catch (RuntimeException e) {
     assertTrue(true);
   }
 }