Search in sources :

Example 1 with ControllerServiceWithLogger

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

the class HtmlDocumentationWriterTest method testControllerServiceWithLogger.

@Test
public void testControllerServiceWithLogger() throws InitializationException, IOException {
    ControllerService controllerService = new ControllerServiceWithLogger();
    controllerService.initialize(new MockControllerServiceInitializationContext());
    DocumentationWriter writer = new HtmlDocumentationWriter();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    writer.write(controllerService, baos, false);
    String results = new String(baos.toByteArray());
    XmlValidator.assertXmlValid(results);
}
Also used : MockControllerServiceInitializationContext(org.apache.nifi.mock.MockControllerServiceInitializationContext) ControllerServiceWithLogger(org.apache.nifi.documentation.example.ControllerServiceWithLogger) DocumentationWriter(org.apache.nifi.documentation.DocumentationWriter) ByteArrayOutputStream(java.io.ByteArrayOutputStream) ControllerService(org.apache.nifi.controller.ControllerService) FullyDocumentedControllerService(org.apache.nifi.documentation.example.FullyDocumentedControllerService) Test(org.junit.Test)

Aggregations

ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 ControllerService (org.apache.nifi.controller.ControllerService)1 DocumentationWriter (org.apache.nifi.documentation.DocumentationWriter)1 ControllerServiceWithLogger (org.apache.nifi.documentation.example.ControllerServiceWithLogger)1 FullyDocumentedControllerService (org.apache.nifi.documentation.example.FullyDocumentedControllerService)1 MockControllerServiceInitializationContext (org.apache.nifi.mock.MockControllerServiceInitializationContext)1 Test (org.junit.Test)1