aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/test')
-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
-rw-r--r--framework/src/test/resources/data/test-profile.json0
-rw-r--r--framework/src/test/resources/data/test2-profile.json0
5 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");
diff --git a/framework/src/test/resources/data/test-profile.json b/framework/src/test/resources/data/test-profile.json
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/framework/src/test/resources/data/test-profile.json
diff --git a/framework/src/test/resources/data/test2-profile.json b/framework/src/test/resources/data/test2-profile.json
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/framework/src/test/resources/data/test2-profile.json