From 2f3017638f39fb6f30ccecc56aad04d31a7ab68f Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Wed, 21 Dec 2016 15:51:00 -0500 Subject: [PATCH] NIFI-3239: - Indicating components are not restricted when appropriate. - Updating unit tests. This closes #1350. Signed-off-by: Aldrin Piri --- .../nifi/documentation/html/HtmlDocumentationWriter.java | 6 ++++-- .../html/ProcessorDocumentationWriterTest.java | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java index 9a60c27428..974e3ebc91 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java @@ -162,7 +162,7 @@ public class HtmlDocumentationWriter implements DocumentationWriter { xmlStreamWriter.writeEndElement(); } else { - xmlStreamWriter.writeCharacters("This processor has no state management."); + xmlStreamWriter.writeCharacters("This component does not store state."); } } @@ -180,7 +180,9 @@ public class HtmlDocumentationWriter implements DocumentationWriter { writeSimpleElement(xmlStreamWriter, "h3", "Restricted: "); if(restricted != null) { - writeSimpleElement(xmlStreamWriter, "td", restricted.value()); + xmlStreamWriter.writeCharacters(restricted.value()); + } else { + xmlStreamWriter.writeCharacters("This component is not restricted."); } } diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/html/ProcessorDocumentationWriterTest.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/html/ProcessorDocumentationWriterTest.java index 61045b0a3d..cf30fbc735 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/html/ProcessorDocumentationWriterTest.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/html/ProcessorDocumentationWriterTest.java @@ -116,8 +116,10 @@ public class ProcessorDocumentationWriterTest { assertContains(results, "This processor has no relationships."); // state management - assertContains(results, "This processor has no state management."); + assertContains(results, "This component does not store state."); + // state management + assertContains(results, "This component is not restricted."); } @Test