nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danbr...@apache.org
Subject [5/5] incubator-nifi git commit: NIFI-632 cleaning up tests
Date Sat, 30 May 2015 16:06:02 GMT
NIFI-632 cleaning up 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/0213608a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/0213608a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/0213608a

Branch: refs/heads/NIFI-632
Commit: 0213608a31e5f9b1dccc9e03fbbb35682cd51ac0
Parents: ef1a735
Author: danbress <dbress@onyxconsults.com>
Authored: Sat May 30 12:04:54 2015 -0400
Committer: danbress <dbress@onyxconsults.com>
Committed: Sat May 30 12:04:54 2015 -0400

----------------------------------------------------------------------
 .../nifi/documentation/DocGeneratorTest.java    | 31 ++++++++++++--------
 1 file changed, 19 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/0213608a/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 320c7c8..83db414 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
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.nifi.documentation;
 
 import java.io.BufferedInputStream;
@@ -8,15 +24,12 @@ import java.io.InputStream;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.nifi.nar.ExtensionManager;
-import org.apache.nifi.nar.ExtensionMapping;
 import org.apache.nifi.nar.NarClassLoaders;
 import org.apache.nifi.nar.NarUnpacker;
-import org.apache.nifi.stream.io.StreamUtils;
 import org.apache.nifi.util.NiFiProperties;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
-import org.mockito.internal.util.io.IOUtil;
 
 public class DocGeneratorTest {
 
@@ -25,18 +38,16 @@ public class DocGeneratorTest {
         TemporaryFolder temporaryFolder = new TemporaryFolder();
         temporaryFolder.create();
 
-        System.out.println("temp folder: " + temporaryFolder.getRoot());
-        
         NiFiProperties properties = loadSpecifiedProperties("/conf/nifi.properties");
         properties.setProperty(NiFiProperties.COMPONENT_DOCS_DIRECTORY, temporaryFolder.getRoot().getAbsolutePath());
 
-        final ExtensionMapping extensionMapping = NarUnpacker.unpackNars(properties);
+        NarUnpacker.unpackNars(properties);
 
         NarClassLoaders.load(properties);
 
         ExtensionManager.discoverExtensions();
 
-        DocGenerator.generate(properties);      
+        DocGenerator.generate(properties);
 
         File processorDirectory = new File(temporaryFolder.getRoot(), "org.apache.nifi.processors.WriteResourceToStream");
         File indexHtml = new File(processorDirectory, "index.html");
@@ -44,11 +55,7 @@ public class DocGeneratorTest {
         String generatedHtml = FileUtils.readFileToString(indexHtml);
         Assert.assertNotNull(generatedHtml);
     }
-    
-    private static String toString(String fileName) {
-        return fileName;
-    }
-    
+
     private NiFiProperties loadSpecifiedProperties(String propertiesFile) {
         String file = DocGeneratorTest.class.getResource(propertiesFile).getFile();
 


Mime
View raw message