aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-20 16:34:10 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-11-14 14:38:13 +0530
commit1ecc057676a6ef788d5193261abd98bd364f10c0 (patch)
tree8b2df724a18ee189ccfef46467e88e3138595a68 /main/src/test
parent92075994f7a2a399f2dced6fb207ebb4e717d8f0 (diff)
Migrate onap-username and onap-password
onap-username and onap-password are migrated into host-username and host-password respectively Issue-Id: CLI-66 Change-Id: I4d658283523e75a2223dac9d0b839fdbc6ae2da3 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'main/src/test')
-rw-r--r--main/src/test/java/org/onap/cli/main/OnapCliMainTest.java4
-rw-r--r--main/src/test/java/org/onap/cli/main/utils/OnapCliUtilsTest.java18
2 files changed, 11 insertions, 11 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 092ef8d8..0ac00d1f 100644
--- a/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java
+++ b/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java
@@ -136,8 +136,8 @@ public class OnapCliMainTest {
@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-username", "paramValue");
+ OnapCommandRegistrar.getRegistrar().addParamCache("host-password", "paramValue");
OnapCommandRegistrar.getRegistrar().addParamCache("host-url", "paramValue");
this.handle(new String[] { "sample-test", "--string-param", "test"});
}
diff --git a/main/src/test/java/org/onap/cli/main/utils/OnapCliUtilsTest.java b/main/src/test/java/org/onap/cli/main/utils/OnapCliUtilsTest.java
index 622cea5f..1ea1a22d 100644
--- a/main/src/test/java/org/onap/cli/main/utils/OnapCliUtilsTest.java
+++ b/main/src/test/java/org/onap/cli/main/utils/OnapCliUtilsTest.java
@@ -34,12 +34,12 @@ public class OnapCliUtilsTest {
@Test
public void testpopulateParamsLong() throws OnapCommandException {
OnapCommandParameter param1 = new OnapCommandParameter();
- param1.setLongOption("onap-username");
- param1.setName("onap-username");
+ param1.setLongOption("host-username");
+ param1.setName("host-username");
param1.setParameterType(ParameterType.STRING);
OnapCommandParameter param2 = new OnapCommandParameter();
- param2.setLongOption("onap-password");
- param2.setName("onap-password");
+ param2.setLongOption("host-password");
+ param2.setName("host-password");
param2.setParameterType(ParameterType.STRING);
OnapCommandParameter param3 = new OnapCommandParameter();
param3.setLongOption("host-url");
@@ -61,13 +61,13 @@ public class OnapCliUtilsTest {
paramslist.add(param4);
paramslist.add(param5);
- String[] args = new String[] { "sample-create", "--onap-username", "admin", "--onap-password", "123",
+ String[] args = new String[] { "sample-create", "--host-username", "admin", "--host-password", "123",
"--host-url", "a@b.com", "--string-param", "blah", "--long-opt", "10" };
OnapCliUtils.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertEquals("onap-username", expectedList.get(2), param1.getValue());
- Assert.assertEquals("onap-password", expectedList.get(4), param2.getValue());
+ Assert.assertEquals("host-username", expectedList.get(2), param1.getValue());
+ Assert.assertEquals("host-password", expectedList.get(4), param2.getValue());
Assert.assertEquals("host-url", expectedList.get(6), param3.getValue());
Assert.assertEquals("string-param", expectedList.get(8), param4.getValue());
Assert.assertEquals("long-opt", expectedList.get(10), param5.getValue());
@@ -184,11 +184,11 @@ public class OnapCliUtilsTest {
OnapCommandParameter param1 = new OnapCommandParameter();
param1.setShortOption("u");
- param1.setName("onap-username");
+ param1.setName("host-username");
param1.setParameterType(ParameterType.STRING);
OnapCommandParameter param2 = new OnapCommandParameter();
param2.setShortOption("p");
- param2.setName("onap-password");
+ param2.setName("host-password");
param2.setParameterType(ParameterType.STRING);
OnapCommandParameter param3 = new OnapCommandParameter();
param3.setShortOption("r");