aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test
diff options
context:
space:
mode:
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");