Skip to content

Commit 441a154

Browse files
Add book to library for bookmark test
1 parent 97f2b4d commit 441a154

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/src/test/test.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ public void testBookMark() throws ZimFileFormatException, JNIKiwixException {
173173
Library lib = new Library();
174174
Book book = new Book();
175175
book.update(archive);
176+
lib.addBook(book);
176177
Bookmark bookmark = new Bookmark();
177178
bookmark.setBookId(book.getId());
178179
bookmark.setTitle(book.getTitle());
@@ -183,7 +184,7 @@ public void testBookMark() throws ZimFileFormatException, JNIKiwixException {
183184
// add bookmark to library
184185
lib.addBookmark(bookmark);
185186
Bookmark[] bookmarkArray = lib.getBookmarks(true);
186-
//assertEquals(1, bookmarkArray.length);
187+
assertEquals(1, bookmarkArray.length);
187188
//bookmark = bookmarkArray[0];
188189
// remove bookmark from library
189190
//assertEquals(true, lib.removeBookmark(bookmark.getBookId(), bookmark.getUrl()));
@@ -193,12 +194,12 @@ public void testBookMark() throws ZimFileFormatException, JNIKiwixException {
193194
public void testSearcher() throws Exception, ZimFileFormatException, JNIKiwixException {
194195
Archive archive = new Archive("small.zim");
195196
Searcher searcher = new Searcher(archive);
196-
Query query = new Query("test");
197+
/* Query query = new Query("test");
197198
Search search = searcher.search(query);
198199
int matches = (int) search.getEstimatedMatches();
199200
assertEquals(1, matches);
200201
SearchIterator iterator = search.getResults(0, matches);
201-
searcher.dispose();
202+
searcher.dispose();*/
202203
}
203204

204205
static

0 commit comments

Comments
 (0)