NIFI-632 - improving tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/4efff41e Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/4efff41e Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/4efff41e Branch: refs/heads/NIFI-632 Commit: 4efff41eddc85eb702662671c269e062bca8913d Parents: ba4d11b Author: danbress <[email protected]> Authored: Sat May 30 12:14:17 2015 -0400 Committer: danbress <[email protected]> Committed: Sun Jun 7 08:30:44 2015 -0400 ---------------------------------------------------------------------- .../nifi/processors/WriteResourceToStream.java | 8 ++++---- .../nifi/documentation/DocGeneratorTest.java | 4 ++++ .../src/test/resources/lib/example.nar | Bin 720984 -> 721040 bytes 3 files changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4efff41e/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java b/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java index 7849128..5d595b4 100644 --- a/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java +++ b/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java @@ -35,16 +35,16 @@ import org.apache.nifi.processor.Relationship; import org.apache.nifi.processor.exception.ProcessException; import org.apache.nifi.processor.io.OutputStreamCallback; -@Tags({ "example" }) -@CapabilityDescription("Provide a description") +@Tags({ "example", "resources" }) +@CapabilityDescription("This example processor loads a resource from the nar and writes it to the FlowFile content") public class WriteResourceToStream extends AbstractProcessor { public static final Relationship REL_SUCCESS = new Relationship.Builder() .name("success") .description("files that were successfully processed").build(); public static final Relationship REL_FAILURE = new Relationship.Builder() - .name("success") - .description("files that were notsuccessfully processed").build(); + .name("failure") + .description("files that were not successfully processed").build(); private Set<Relationship> relationships; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4efff41e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/DocGeneratorTest.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/DocGeneratorTest.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/DocGeneratorTest.java index 83db414..9438601 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/DocGeneratorTest.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/DocGeneratorTest.java @@ -54,6 +54,10 @@ public class DocGeneratorTest { Assert.assertTrue(indexHtml + " should have been generated", indexHtml.exists()); String generatedHtml = FileUtils.readFileToString(indexHtml); Assert.assertNotNull(generatedHtml); + Assert.assertTrue(generatedHtml.contains("This example processor loads a resource from the nar and writes it to the FlowFile content")); + Assert.assertTrue(generatedHtml.contains("files that were successfully processed")); + Assert.assertTrue(generatedHtml.contains("files that were not successfully processed")); + Assert.assertTrue(generatedHtml.contains("resources")); } private NiFiProperties loadSpecifiedProperties(String propertiesFile) { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/4efff41e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/resources/lib/example.nar ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/resources/lib/example.nar b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/resources/lib/example.nar index 5c0182b..0bca10b 100644 Binary files a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/resources/lib/example.nar and b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/resources/lib/example.nar differ
