summaryrefslogtreecommitdiffstats
path: root/main/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/test/java')
-rw-r--r--main/src/test/java/org/onap/cli/main/OnapCliMainTest.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java b/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java
index 0a84d268..f052cbd1 100644
--- a/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java
+++ b/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java
@@ -129,6 +129,25 @@ public class OnapCliMainTest {
}
@Test
+ public void testVersionSampleCommandShort() {
+ this.handle(new String[] { "sample-test", "-v" });
+ }
+
+ @Test
+ public void testHandleSampleCommandSet() throws OnapCommandException {
+ OnapCommandRegistrar.getRegistrar().addParamCache("sample:string-param", "paramValue");
+ OnapCommandRegistrar.getRegistrar().addParamCache("onap-username", "paramValue");
+ OnapCommandRegistrar.getRegistrar().addParamCache("onap-password", "paramValue");
+ OnapCommandRegistrar.getRegistrar().addParamCache("host-url", "paramValue");
+ this.handle(new String[] { "sample-test", "--string-param", "test"});
+ }
+
+ @Test
+ public void testHandleSampleCommandFailure() throws OnapCommandException {
+ this.handle(new String[] { "sample-test", "--string-param"});
+ }
+
+ @Test
public void interactiveTest() {
cli = new OnapCli(new String[] {});