use of org.opengrok.indexer.analysis.StreamSource in project OpenGrok by OpenGrok.
the class TroffAnalyzerTest method testAnalyze.
/**
* Test method for {@link org.opengrok.indexer.analysis.document
* .TroffAnalyzer#analyze(org.apache.lucene.document.Document,
* java.io.InputStream)}.
*
* @throws IOException I/O exception
*/
@Test
void testAnalyze() throws IOException {
Document doc = new Document();
StringWriter xrefOut = new StringWriter();
analyzer.analyze(doc, new StreamSource() {
@Override
public InputStream getStream() throws IOException {
return new ByteArrayInputStream(content.getBytes());
}
}, xrefOut);
}
Aggregations