summaryrefslogtreecommitdiffstats
path: root/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/test
diff options
context:
space:
mode:
authorshrek2000 <orenkle@amdocs.com>2017-12-27 10:32:14 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-27 09:30:20 +0000
commit231e28d57fd0e9b4246027c852b20a5627069d36 (patch)
tree250d0e2bd9ccf1c342905a9a38141feb4261af80 /common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/test
parented9526956b8dceb0f33201486f406fb1c7cc365b (diff)
add private constructor
Change-Id: I89c40a4e566fcc00de2b3e9b49def9b04c366d24 Issue-ID: SDC-793 Signed-off-by: shrek2000 <orenkle@amdocs.com>
Diffstat (limited to 'common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/test')
-rw-r--r--common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/test/java/org/openecomp/config/ConfigurationUtilsTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/test/java/org/openecomp/config/ConfigurationUtilsTest.java b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/test/java/org/openecomp/config/ConfigurationUtilsTest.java
new file mode 100644
index 0000000000..d6bc1f637c
--- /dev/null
+++ b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/test/java/org/openecomp/config/ConfigurationUtilsTest.java
@@ -0,0 +1,24 @@
+package org.openecomp.config;
+
+import org.junit.Test;
+
+import java.util.Arrays;
+import java.util.List;
+
+import static org.junit.Assert.assertTrue;
+
+public class ConfigurationUtilsTest {
+ @Test
+ public void testCommaList() {
+ List list = Arrays.asList("1", "2", 3);
+ String commaSeparatedList = ConfigurationUtils.getCommaSeparatedList(list);
+ list.forEach(o -> assertTrue(commaSeparatedList.contains(o.toString())));
+ }
+
+ @Test
+ public void testCommaListWithNullAndEmptyStrings() {
+ List list = Arrays.asList(null, "", " ");
+ String commaSeparatedList = ConfigurationUtils.getCommaSeparatedList(list);
+ assertTrue(commaSeparatedList.isEmpty());
+ }
+} \ No newline at end of file