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