|
18 | 18 |
|
19 | 19 | import org.junit.Test; |
20 | 20 | import org.junit.experimental.categories.Category; |
21 | | -import org.opencb.commons.datastore.core.ObjectMap; |
22 | | -import org.opencb.opencga.analysis.customTool.CustomToolExecutor; |
23 | 21 | import org.opencb.opencga.core.exceptions.ToolException; |
24 | 22 | import org.opencb.opencga.core.models.common.Enums; |
25 | 23 | import org.opencb.opencga.core.testclassification.duration.ShortTests; |
26 | | -import org.opencb.opencga.core.tools.ToolParams; |
27 | 24 | import org.opencb.opencga.core.tools.annotations.Tool; |
28 | 25 |
|
29 | | -import java.lang.reflect.Field; |
30 | 26 | import java.util.Arrays; |
31 | 27 | import java.util.Collections; |
32 | 28 | import java.util.HashSet; |
@@ -59,37 +55,6 @@ protected void run() throws Exception { |
59 | 55 | } |
60 | 56 | } |
61 | 57 |
|
62 | | - @Test |
63 | | - public void test() throws ToolException { |
64 | | -// ObjectMap params = new ObjectMap("params", new ObjectMap("commandLine", "blablabla")); |
65 | | - ObjectMap params2 = new ObjectMap("params", new ObjectMap("params", new ObjectMap("key", "value")).append("commandLine", "blablabla")); |
66 | | - |
67 | | - CustomToolExecutor customToolExecutor = new CustomToolExecutor(); |
68 | | - |
69 | | - ToolParams toolParams = null; |
70 | | - for (Field field : CustomToolExecutor.class.getDeclaredFields()) { |
71 | | - if (field.isAnnotationPresent(org.opencb.opencga.core.tools.annotations.ToolParams.class) |
72 | | - && ToolParams.class.isAssignableFrom(field.getType())) { |
73 | | - try { |
74 | | - field.setAccessible(true); |
75 | | - toolParams = (ToolParams) field.get(customToolExecutor); |
76 | | - if (toolParams == null) { |
77 | | - toolParams = (ToolParams) field.getType().newInstance(); |
78 | | - field.set(customToolExecutor, toolParams); |
79 | | - } |
80 | | - break; |
81 | | - } catch (IllegalAccessException | InstantiationException e) { |
82 | | - throw new ToolException("Unexpected error reading ToolParams"); |
83 | | - } |
84 | | - } |
85 | | - } |
86 | | - System.out.println("toolParams.toJson() = " + toolParams.toJson()); |
87 | | -// toolParams.updateParams(params); |
88 | | - System.out.println("toolParams.toJson() = " + toolParams.toJson()); |
89 | | - toolParams.updateParams(params2); |
90 | | - System.out.println("toolParams.toJson() = " + toolParams.toJson()); |
91 | | - } |
92 | | - |
93 | 58 | @Test |
94 | 59 | public void testFactoryById() throws ToolException { |
95 | 60 | ToolFactory toolFactory = new ToolFactory(); |
|
0 commit comments