예제 #1
0
 public void testGetAllISBNsDoesNotIncludeCompactDiscs() {
   gateway.addCopies(
       new CompactDisc("abcd", "Peace and War, The Musical", "Gilbertolov and Sullivanalov"), 2);
   gateway.addCopies(new CompactDisc("xyz", "The White Album", "The Beatles"), 2);
   Map isbnsTitles = gateway.findAllISBNsAndTitles();
   assertEquals(1, isbnsTitles.size());
   assertEquals(6, gateway.copyCount());
 }
예제 #2
0
 public void testGetCopyCount() {
   gateway.addCopies(new Book("isbn1", "Peace and War 1", "Toy Story"), 2);
   gateway.addCopies(new Book("isbn2", "Peace and War 2", "Toy Story"), 3);
   gateway.addCopies(new Book("isbn3", "Peace and War 3", "Toy Story"), 1);
   assertEquals(8, gateway.copyCount());
 }