mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-10 07:36:26 -04:00
Added more test cases for bookmark
This commit is contained in:
parent
c38ccd8015
commit
a0fd51228c
@ -200,8 +200,12 @@ public class test {
|
|||||||
Bookmark[] bookmarkArray = lib.getBookmarks(true);
|
Bookmark[] bookmarkArray = lib.getBookmarks(true);
|
||||||
assertEquals(1, bookmarkArray.length);
|
assertEquals(1, bookmarkArray.length);
|
||||||
bookmark = bookmarkArray[0];
|
bookmark = bookmarkArray[0];
|
||||||
// test bookmark title
|
// test saved bookmark
|
||||||
|
assertEquals(bookmark.getBookId(), book.getId());
|
||||||
assertEquals(bookmark.getTitle(), book.getTitle());
|
assertEquals(bookmark.getTitle(), book.getTitle());
|
||||||
|
assertEquals(bookmark.getUrl(), book.getUrl());
|
||||||
|
assertEquals(bookmark.getLanguage(), book.getLanguage());
|
||||||
|
assertEquals(bookmark.getDate(), book.getDate());
|
||||||
// remove bookmark from library
|
// remove bookmark from library
|
||||||
lib.removeBookmark(bookmark.getBookId(), bookmark.getUrl());
|
lib.removeBookmark(bookmark.getBookId(), bookmark.getUrl());
|
||||||
bookmarkArray = lib.getBookmarks(true);
|
bookmarkArray = lib.getBookmarks(true);
|
||||||
@ -218,6 +222,7 @@ public class test {
|
|||||||
int estimatedMatches = (int) search.getEstimatedMatches();
|
int estimatedMatches = (int) search.getEstimatedMatches();
|
||||||
assertEquals(1, estimatedMatches);
|
assertEquals(1, estimatedMatches);
|
||||||
SearchIterator iterator = search.getResults(0, estimatedMatches);
|
SearchIterator iterator = search.getResults(0, estimatedMatches);
|
||||||
|
assertEquals("Test ZIM file", iterator.getTitle());
|
||||||
searcher.dispose();
|
searcher.dispose();
|
||||||
|
|
||||||
SuggestionSearcher suggestionSearcher = new SuggestionSearcher(archive);
|
SuggestionSearcher suggestionSearcher = new SuggestionSearcher(archive);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user