use of org.apache.nifi.documentation.example.NakedProcessor in project nifi by apache.
the class ProcessorDocumentationWriterTest method testNakedProcessor.
@Test
public void testNakedProcessor() throws IOException {
NakedProcessor processor = new NakedProcessor();
ProcessorInitializer initializer = new ProcessorInitializer();
initializer.initialize(processor);
DocumentationWriter writer = new HtmlProcessorDocumentationWriter();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
writer.write(processor, baos, false);
initializer.teardown(processor);
String results = new String(baos.toByteArray());
XmlValidator.assertXmlValid(results);
// no description
assertContains(results, "No description provided.");
// no tags
assertContains(results, "No tags provided.");
// properties
assertContains(results, "This component has no required or optional properties.");
// relationships
assertContains(results, "This processor has no relationships.");
// state management
assertContains(results, "This component does not store state.");
// state management
assertContains(results, "This component is not restricted.");
// input requirement
assertNotContains(results, "Input requirement:");
}
Aggregations