private void verify(List<String> tokens, boolean[] isHashtag) { for (int i = 0; i < tokens.size(); i++) { assertTrue(stream.incrementToken()); assertEquals(tokens.get(i), termAttr.getTermString()); assertEquals(isHashtag[i], TokenType.HASHTAG.equals(typeAttr.getType())); } assertFalse(stream.incrementToken()); }
private void verify(List<String> tokens, TokenType... types) { for (int i = 0; i < tokens.size(); i++) { assertTrue(stream.incrementToken()); assertEquals(tokens.get(i), termAttr.getTermString()); assertEquals(types[i], typeAttr.getType()); } assertFalse(stream.incrementToken()); }