File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,6 +70,15 @@ public void testArchive()
7070 assertEquals (new String (faviconData ), c );
7171
7272 archive .dispose ();
73+
74+ // test reader with invalid zim file
75+ String zimFile = "test.zim" ;
76+ try {
77+ Archive archive1 = new Archive (zimFile );
78+ fail ("ERROR: Archive created with invalid Zim file!" );
79+ } catch (ZimFileFormatException zimFileFormatException ) {
80+ assertEquals ("Cannot open zimfile " + zimFile , zimFileFormatException .getMessage ());
81+ }
7382 }
7483
7584 @ Test
@@ -144,6 +153,11 @@ public void testLibrary()
144153 String [] bookIds = lib .getBooksIds ();
145154 assertEquals (bookIds .length , 1 );
146155 lib .filter (new Filter ().local (true ));
156+
157+ // remove book from library by id
158+ lib .removeBookById (bookIds [0 ]);
159+ bookIds = lib .getBooksIds ();
160+ assertEquals (bookIds .length , 0 );
147161 }
148162
149163 @ Test
You can’t perform that action at this time.
0 commit comments