diff options
author | amitjai <amitjai@amdocs.com> | 2018-04-27 13:28:57 +0530 |
---|---|---|
committer | Oren Kleks <orenkle@amdocs.com> | 2018-04-30 06:05:27 +0000 |
commit | 42c920baf4dbb9fe8775843a6d4c9f70fa29f064 (patch) | |
tree | ac2aff977e2b129e61d2166c4832842676e4f5c3 /common/onap-common-configuration-management/onap-configuration-management-core/src/test | |
parent | f487427a32f410ab5c97a4092865d32beb88ee27 (diff) |
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 <amitjai@amdocs.com>
Diffstat (limited to 'common/onap-common-configuration-management/onap-configuration-management-core/src/test')
-rw-r--r-- | common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java | 32 |
1 files changed, 32 insertions, 0 deletions
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 |