aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/test/java
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-03-06 14:44:24 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-03-08 11:17:58 +0530
commita74a9b50f244f49a38ba36b2b59b3c8e23649949 (patch)
tree6a8027a230d618c66cb9ce5fb5d48bfd0124e132 /framework/src/test/java
parent253e9d49e5ceec6d14c833a3ecc40cbff877d5de (diff)
Add profile list support
Issue-ID: CLI-95 Change-Id: Ic50132693fcd8a49c7e0b1bfb38e02f0948f764d 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/input/OnapCommandParameterCacheTest.java2
-rw-r--r--framework/src/test/java/org/onap/cli/fw/input/cache/OnapCommandParameterCacheTest.java33
-rw-r--r--framework/src/test/java/org/onap/cli/fw/registrar/OnapCommandRegistrarTest.java2
3 files changed, 35 insertions, 2 deletions
diff --git a/framework/src/test/java/org/onap/cli/fw/input/OnapCommandParameterCacheTest.java b/framework/src/test/java/org/onap/cli/fw/input/OnapCommandParameterCacheTest.java
index ea06ea1b..302d280b 100644
--- a/framework/src/test/java/org/onap/cli/fw/input/OnapCommandParameterCacheTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/input/OnapCommandParameterCacheTest.java
@@ -27,7 +27,7 @@ public class OnapCommandParameterCacheTest {
cache.add("1.0", "a", "b");
cache.remove("1.0", "a");
- cache.setProfile("test");
+ cache.setProfile("test123");
cache.getParams("1.0");
}
diff --git a/framework/src/test/java/org/onap/cli/fw/input/cache/OnapCommandParameterCacheTest.java b/framework/src/test/java/org/onap/cli/fw/input/cache/OnapCommandParameterCacheTest.java
new file mode 100644
index 00000000..be539946
--- /dev/null
+++ b/framework/src/test/java/org/onap/cli/fw/input/cache/OnapCommandParameterCacheTest.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2017 Huawei Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.cli.fw.input.cache;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+
+public class OnapCommandParameterCacheTest {
+ @Test
+ public void paramTypeGetTest() {
+
+ assertTrue(OnapCommandParameterCache.getInstance().getProfiles().contains("test"));
+
+
+ }
+
+}
diff --git a/framework/src/test/java/org/onap/cli/fw/registrar/OnapCommandRegistrarTest.java b/framework/src/test/java/org/onap/cli/fw/registrar/OnapCommandRegistrarTest.java
index 539ec245..124b9564 100644
--- a/framework/src/test/java/org/onap/cli/fw/registrar/OnapCommandRegistrarTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/registrar/OnapCommandRegistrarTest.java
@@ -90,7 +90,7 @@ public class OnapCommandRegistrarTest {
@Test
public void testProfile() throws OnapCommandException {
try {
- OnapCommandRegistrar.getRegistrar().setProfile("test");
+ OnapCommandRegistrar.getRegistrar().setProfile("test12312");
OnapCommandRegistrar.getRegistrar().addParamCache("a", "b");
OnapCommandRegistrar.getRegistrar().getParamCache();
OnapCommandRegistrar.getRegistrar().removeParamCache("a");