@Test public void shouldNotCreateRootsWhenPartialInputIsShort() { assertThat(findRootsForPartialInput(".", ".,"), hasSize(0)); assertThat(findRootsForPartialInput(".", " "), hasSize(0)); assertThat(findRootsForPartialInput("*", "*+"), hasSize(0)); assertThat(findRootsForPartialInput("¨", "¨¨"), 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);  }