ANY23-331 put META-INF/services tool entries into correct jar file
authorHans <firedrake93@gmail.com>
Fri, 13 Apr 2018 03:10:19 +0000 (22:10 -0500)
committerHans <firedrake93@gmail.com>
Fri, 13 Apr 2018 03:10:19 +0000 (22:10 -0500)
cli/src/main/resources/META-INF/services/org.apache.any23.cli.Tool [moved from core/src/main/resources/META-INF/services/org.apache.any23.cli.Tool with 100% similarity]
cli/src/test/java/org/apache/any23/cli/Any23PluginManagerToolsTest.java [new file with mode: 0644]
core/src/test/java/org/apache/any23/plugin/Any23PluginManagerTest.java

diff --git a/cli/src/test/java/org/apache/any23/cli/Any23PluginManagerToolsTest.java b/cli/src/test/java/org/apache/any23/cli/Any23PluginManagerToolsTest.java
new file mode 100644 (file)
index 0000000..f9e6a38
--- /dev/null
@@ -0,0 +1,32 @@
+package org.apache.any23.cli;
+
+import org.apache.any23.plugin.Any23PluginManager;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import static org.junit.Assert.assertTrue;
+
+public class Any23PluginManagerToolsTest {
+
+    private Any23PluginManager manager;
+
+    @Before
+    public void before() {
+        manager = Any23PluginManager.getInstance();
+    }
+
+    @After
+    public void after() {
+        manager = null;
+    }
+
+    @Test
+    public void testGetTools() throws IOException {
+        Iterator<Tool> tools = manager.getTools();
+        assertTrue(tools.hasNext()); // NOTE: Punctual tool detection verification done by ToolRunnerTest.java
+    }
+}
index b11d2bb..4b373e5 100644 (file)
@@ -29,7 +29,6 @@ import java.util.Iterator;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
-import org.apache.any23.cli.Tool;
 import org.apache.any23.extractor.ExtractorFactory;
 import org.junit.After;
 import org.junit.Before;
@@ -55,12 +54,6 @@ public class Any23PluginManagerTest {
     }
 
     @Test
-    public void testGetTools() throws IOException {
-        Iterator<Tool> tools = manager.getTools();
-        assertTrue(tools.hasNext()); // NOTE: Punctual tool detection verification done by ToolRunnerTest.java
-    }
-
-    @Test
     public void testGetPlugins() throws IOException {
         Iterator<ExtractorFactory> extractorPlugins = manager.getExtractors();
         assertTrue(extractorPlugins.hasNext());