summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-common-lib/src/test/java/org
diff options
context:
space:
mode:
authorSatyaki Mallick <satyaki.mallick@huawei.com>2018-10-21 19:19:42 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-11-12 10:42:35 +0000
commit01c427f1a30ecbcee63fabbee4bc0877a9aec53b (patch)
treebc0b3ca25f20a9c11a5d2f612e767886295ed7ad /openecomp-be/lib/openecomp-common-lib/src/test/java/org
parentfbd23ad8f6c29c8f1c24eca5e03c47995b89a5ea (diff)
Add UT for CommonUtil
Add UT for CommonUtil in openecomp-be. Issue-ID: SDC-1774 Change-Id: Id197e79ede009f3ca34043f907a48b26af17be53 Signed-off-by: Satyaki Mallick <satyaki.mallick@huawei.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-common-lib/src/test/java/org')
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/test/java/org/openecomp/sdc/common/utils/CommonUtilTest.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-common-lib/src/test/java/org/openecomp/sdc/common/utils/CommonUtilTest.java b/openecomp-be/lib/openecomp-common-lib/src/test/java/org/openecomp/sdc/common/utils/CommonUtilTest.java
new file mode 100644
index 0000000000..d421043c80
--- /dev/null
+++ b/openecomp-be/lib/openecomp-common-lib/src/test/java/org/openecomp/sdc/common/utils/CommonUtilTest.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2017 Huawei Intellectual Property. All rights reserved.
+ *
+ * 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.openecomp.sdc.common.utils;
+
+import org.testng.annotations.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.testng.Assert.assertTrue;
+
+public class CommonUtilTest {
+
+ @Test
+ public void testGetObjectAsMap() {
+ Map<String, String> obj = new HashMap<>(1);
+ obj.put(CommonUtil.DEFAULT, "");
+ Map<String, Object> newMap = CommonUtil.getObjectAsMap(obj);
+
+ boolean exists = newMap.containsKey(CommonUtil._DEFAULT);
+
+ assertTrue(exists);
+ }
+} \ No newline at end of file