Search in sources :

Example 1 with ReportingTaskWithLogger

use of org.apache.nifi.documentation.example.ReportingTaskWithLogger in project nifi by apache.

the class HtmlDocumentationWriterTest method testReportingTaskWithLogger.

@Test
public void testReportingTaskWithLogger() throws InitializationException, IOException {
    ReportingTask controllerService = new ReportingTaskWithLogger();
    controllerService.initialize(new MockReportingInitializationContext());
    DocumentationWriter writer = new HtmlDocumentationWriter();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    writer.write(controllerService, baos, false);
    String results = new String(baos.toByteArray());
    XmlValidator.assertXmlValid(results);
}
Also used : ReportingTaskWithLogger(org.apache.nifi.documentation.example.ReportingTaskWithLogger) MockReportingInitializationContext(org.apache.nifi.mock.MockReportingInitializationContext) DocumentationWriter(org.apache.nifi.documentation.DocumentationWriter) ByteArrayOutputStream(java.io.ByteArrayOutputStream) FullyDocumentedReportingTask(org.apache.nifi.documentation.example.FullyDocumentedReportingTask) ReportingTask(org.apache.nifi.reporting.ReportingTask) Test(org.junit.Test)

Aggregations

ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 DocumentationWriter (org.apache.nifi.documentation.DocumentationWriter)1 FullyDocumentedReportingTask (org.apache.nifi.documentation.example.FullyDocumentedReportingTask)1 ReportingTaskWithLogger (org.apache.nifi.documentation.example.ReportingTaskWithLogger)1 MockReportingInitializationContext (org.apache.nifi.mock.MockReportingInitializationContext)1 ReportingTask (org.apache.nifi.reporting.ReportingTask)1 Test (org.junit.Test)1