summaryrefslogtreecommitdiffstats
path: root/framework/src/test/java
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-10-01 00:12:20 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-11-14 14:39:44 +0530
commitde0dcbad873481bee88eb68e2c03a82bdad85781 (patch)
treeacf3ad45c3177fc1ca2b466453cf158bb1b644a3 /framework/src/test/java
parent74f654c7cc41908d0109f60c7554f329f0b29daf (diff)
Add Info section
Issue-Id: CLI-66 Change-Id: I864c4af234e7f27d75eaad7318e0d919c1d82305 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'framework/src/test/java')
-rw-r--r--framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java40
1 files changed, 28 insertions, 12 deletions
diff --git a/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java b/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java
index b3835cee..096c6ff3 100644
--- a/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java
@@ -22,9 +22,14 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import mockit.Invocation;
-import mockit.Mock;
-import mockit.MockUp;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import org.junit.FixMethodOrder;
import org.junit.Ignore;
@@ -50,21 +55,16 @@ import org.onap.cli.fw.error.OnapCommandParameterOptionConflict;
import org.onap.cli.fw.error.OnapCommandSchemaNotFound;
import org.onap.cli.fw.http.HttpInput;
import org.onap.cli.fw.http.HttpResult;
+import org.onap.cli.fw.info.OnapCommandInfo;
import org.onap.cli.fw.input.OnapCommandParameter;
import org.onap.cli.fw.input.ParameterType;
import org.onap.cli.fw.output.OnapCommandResult;
import org.onap.cli.fw.run.OnapCommandExecutor;
import org.springframework.core.io.Resource;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import mockit.Invocation;
+import mockit.Mock;
+import mockit.MockUp;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class OnapCommandUtilsTest {
@@ -434,6 +434,22 @@ public class OnapCommandUtilsTest {
}
+
+ @Test
+ public void test() throws OnapCommandException {
+ OnapCommandSampleInfo cmd = new OnapCommandSampleInfo();
+ OnapCommandUtils.loadSchema(cmd, "sample-test-info.yaml", true, false);
+ OnapCommandInfo info = cmd.getInfo();
+ assert info != null;
+ }
+
+ @OnapCommandSchema(name = "sample-test-info", version = "cli-1.0", schema = "sample-test-info.yaml")
+ class OnapCommandSampleInfo extends OnapCommand {
+ @Override
+ protected void run() throws OnapCommandException {
+ }
+ }
+
@OnapCommandSchema(name = "sample-test", version = "cli-1.0", schema = "sample-test-schema.yaml")
class OnapCommandSample extends OnapCommand {
@Override