dictionary = InMemoryDictionary.newInstance(TestWords.getTestReader(), false, "tiny-lower");
}
@Test
public void testPartialSearch() throws IOException {
CandidatePattern subString = dictionary.buildInitialCandidate(0);
subString.add('w');
subString.add('i');
boolean isPossible = dictionary.partialMatch(subString);
assertTrue(isPossible);
boolean isWord = dictionary.isMatch(subString);
assertFalse(isWord);
subString.add('s');
isPossible = dictionary.partialMatch(subString);
assertTrue(isPossible);
isWord = dictionary.isMatch(subString);
assertFalse(isWord);
subString.add('t');
isPossible = dictionary.partialMatch(subString);
assertTrue(isPossible);
isWord = dictionary.isMatch(subString);
assertTrue(isWord);
subString.add('z');
isPossible = dictionary.partialMatch(subString);
assertFalse(isPossible);
isWord = dictionary.isMatch(subString);
assertFalse(isWord);
}