Esempio n. 1
0
 public MediaCopy findAvailableCopy(String id) {
   List copies = findAllCopies(id);
   for (int i = 0; i < copies.size(); i++) {
     MediaCopy copy = (MediaCopy) copies.get(i);
     if (!copy.isLoaned()) return copy;
   }
   return null;
 }
Esempio n. 2
0
 public void testShouldSetCopyToBorrowed() throws Exception {
   receipt = library.loan(copy, patron);
   assertTrue(copy.isLoaned());
 }