From 42c920baf4dbb9fe8775843a6d4c9f70fa29f064 Mon Sep 17 00:00:00 2001 From: amitjai Date: Fri, 27 Apr 2018 13:28:57 +0530 Subject: Rename packages from openecomp to onap. This task is all about package name space change also make changes to pom for common module Change-Id: Ie9bda0f958a9a05826c0374830cc9cb7d6d196b6 Issue-ID: SDC-1272 Signed-off-by: amitjai --- .../org/onap/config/ConfigurationUtilsTest.java | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java (limited to 'common/onap-common-configuration-management/onap-configuration-management-core/src/test') diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java new file mode 100644 index 0000000000..90966fccf6 --- /dev/null +++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java @@ -0,0 +1,32 @@ +package org.onap.config; + +import org.junit.Test; + +import java.util.Arrays; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +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()); + } + + @Test + public void testGetArrayClassFunction() { + assertEquals(String[].class , ConfigurationUtils.getArrayClass(String.class)); + assertNull(ConfigurationUtils.getArrayClass(ConfigurationUtilsTest.class)); + } +} \ No newline at end of file -- cgit 1.2.3-korg