@Test public void shouldNotCreateRootsWhenInputIsNotPunc() { assertThat(findRootsForPartialInput(".a", ".a"), hasSize(0)); assertThat(findRootsForPartialInput(" 1", " 1"), hasSize(0)); assertThat(findRootsForPartialInput(" .", " ."), hasSize(0)); assertThat(findRootsForPartialInput("a..", "a.."), hasSize(0)); assertThat(findRootsForPartialInput("abc", "abc"), hasSize(0)); }
@Override public List<ImmutableRoot> findRootsForPartialInput(TurkishSequence partialInput, TurkishSequence input) { final ImmutableLexeme lexeme = new ImmutableLexeme(partialInput.getUnderlyingString(), input.getUnderlyingString(), PrimaryPos.Punctuation, null, null); return Arrays.asList(new ImmutableRoot(partialInput, lexeme, null, null)); }
PuncRootFinder implements RootFinder { @Override public List<ImmutableRoot> findRootsForPartialInput(TurkishSequence partialInput, TurkishSequence input) { final ImmutableLexeme lexeme = new ImmutableLexeme(partialInput.getUnderlyingString(), input.getUnderlyingString(), PrimaryPos.Punctuation, null, null); return Arrays.asList(new ImmutableRoot(partialInput, lexeme, null, null)); } }
PuncRootFinder implements RootFinder { @Override public List<ImmutableRoot> findRootsForPartialInput(TurkishSequence partialInput, TurkishSequence input) { final ImmutableLexeme lexeme = new ImmutableLexeme(partialInput.getUnderlyingString(), input.getUnderlyingString(), PrimaryPos.Punctuation, null, null); return Arrays.asList(new ImmutableRoot(partialInput, lexeme, null, null)); }  }
PuncRootFinder implements RootFinder { @Override public List<ImmutableRoot> findRootsForPartialInput(TurkishSequence partialInput, TurkishSequence input) { final ImmutableLexeme lexeme = new ImmutableLexeme(partialInput.getUnderlyingString(), input.getUnderlyingString(), PrimaryPos.Punctuation, null, null); return Arrays.asList(new ImmutableRoot(partialInput, lexeme, null, null)); }  @Override boolean handles(TurkishSequence partialInput, TurkishSequence input); @Override List<ImmutableRoot> findRootsForPartialInput(TurkishSequence partialInput, TurkishSequence input); }
PuncRootFinder implements RootFinder { @Override public List<ImmutableRoot> findRootsForPartialInput(TurkishSequence partialInput, TurkishSequence input) { final ImmutableLexeme lexeme = new ImmutableLexeme(partialInput.getUnderlyingString(), input.getUnderlyingString(), PrimaryPos.Punctuation, null, null); return Arrays.asList(new ImmutableRoot(partialInput, lexeme, null, null)); }  @Override boolean handles(TurkishSequence partialInput, TurkishSequence input); @Override List<ImmutableRoot> findRootsForPartialInput(TurkishSequence partialInput, TurkishSequence input);  }