diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2017-09-18 11:38:10 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2017-09-18 11:38:10 +0530 |
commit | dfeb8e23c04bc94050f95c95458605fb4c3cb6d5 (patch) | |
tree | 84bfa4840d29fcb08afbb1fc1bc4e72f0fdf1bf6 /main/src/test/java/org/onap | |
parent | 1a4b4030e10b53ffc80d977908cd6097d843f7a8 (diff) |
Improve the UT of profile
CLI-43
Change-Id: If2f1040a93d18d8f4375c459db3e7250f4dba99f
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'main/src/test/java/org/onap')
-rw-r--r-- | main/src/test/java/org/onap/cli/main/OnapCliMainTest.java | 19 |
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[] {}); |