mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-11 08:08:46 -04:00
[test] Get the suggestion result from the first result.
This commit is contained in:
parent
1806febcf4
commit
eaf9b3aac9
@ -199,7 +199,7 @@ public class test {
|
|||||||
TestSuggestionSearch suggestionSearch = suggestionSearcher.suggest("test");
|
TestSuggestionSearch suggestionSearch = suggestionSearcher.suggest("test");
|
||||||
int matches = (int) suggestionSearch.getEstimatedMatches();
|
int matches = (int) suggestionSearch.getEstimatedMatches();
|
||||||
assertEquals(1, matches);
|
assertEquals(1, matches);
|
||||||
TestSuggestionIterator results = suggestionSearch.getResults(1, matches);
|
TestSuggestionIterator results = suggestionSearch.getResults(0, matches);
|
||||||
TestSuggestionItem suggestionItem = results.next();
|
TestSuggestionItem suggestionItem = results.next();
|
||||||
assertEquals("Test ZIM file", suggestionItem.getTitle());
|
assertEquals("Test ZIM file", suggestionItem.getTitle());
|
||||||
suggestionSearcher.dispose();
|
suggestionSearcher.dispose();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user