@Test public void returns_false_when_no_more_tokens() throws IOException { try (TokenFilter f = new AnnotatorTokenFilter(new EmptyTokenStream(), annotator)) { f.reset(); assertThat(f.incrementToken()).isFalse(); } }
@Test public void returns_false_when_no_more_tokens() throws IOException { try (TokenFilter f = new PreAnnotatedTokenFilter(new EmptyTokenStream(), 1, 2)) { f.reset(); assertThat(f.incrementToken()).isFalse(); } }
@Test public void returns_false_when_no_more_tokens() throws IOException { try (TokenFilter f = new SimplePreAnnotatedTokenFilter(new EmptyTokenStream(), 1, 2)) { f.reset(); assertThat(f.incrementToken()).isFalse(); } }
/** * Constructs a {@link TokenStream} that returns nothing */ public TokenStream tokenStream(String fieldName, Reader reader) { return new EmptyTokenStream(); }
@SuppressWarnings({ "unused", "resource" }) @Test public void fails_if_no_annotation_markers() { expected.expect(IllegalArgumentException.class); new PreAnnotatedTokenFilter(new EmptyTokenStream()); }
@SuppressWarnings({ "unused", "resource" }) @Test public void fails_if_no_annotation_markers() { expected.expect(IllegalArgumentException.class); new SimplePreAnnotatedTokenFilter(new EmptyTokenStream()); }