diff --git a/lib/src/test/test.java b/lib/src/test/test.java index 62132ec..3f8c582 100644 --- a/lib/src/test/test.java +++ b/lib/src/test/test.java @@ -198,13 +198,8 @@ public class test { archive.dispose(); } - @Test - public void testLibrary() + private void testLibrary(TestLibrary lib) throws IOException { - TestLibrary lib = new TestLibrary(); - TestManager manager = new TestManager(lib); - String content = getTextFileContent("catalog.xml"); - manager.readOpds(content, "http://localhost"); assertEquals(lib.getBookCount(true, true), 1); String[] bookIds = lib.getBooksIds(); assertEquals(bookIds.length, 1); @@ -246,6 +241,15 @@ public class test { assertEquals(bookIds.length, 0); } + @Test + public void testLibraryOPDS() throws IOException { + TestLibrary lib = new TestLibrary(); + TestManager manager = new TestManager(lib); + String content = getTextFileContent("catalog.xml"); + manager.readOpds(content, "http://localhost"); + testLibrary(lib); + } + @Test public void testServer() throws ZimFileFormatException, JNIKiwixException { TestArchive archive = new TestArchive("small.zim");