* @param aTaeDesc
* description of TextAnalysisEngine to test
*/
protected void _testProcess(TaeDescription aTaeDesc) throws UIMAException {
// create and initialize TextAnalysisEngine
TextAnalysisEngine tae = UIMAFramework.produceTAE(aTaeDesc);
// Test each form of the process method. When TestAnnotator executes, it
// stores in static fields the document text and the ResultSpecification.
// We use thse to make sure the information propogates correctly to the annotator.
// process(CAS)
CAS tcas = tae.newCAS();
tcas.setDocumentText("new test");
tae.process(tcas);
assertEquals("new test", TestAnnotator.lastDocument);
tcas.reset();
// process(CAS,ResultSpecification)
ResultSpecification resultSpec = new ResultSpecification_impl();
resultSpec.addResultType("NamedEntity", true);
tcas.setDocumentText("testing...");
tae.process(tcas, resultSpec);
assertEquals("testing...", TestAnnotator.lastDocument);
assertEquals(resultSpec, TestAnnotator.lastResultSpec);
tcas.reset();
tae.destroy();
}