d6bc1f637c27dbcc6f503c244523ad10909c9b15
[sdc.git] /
1 package org.openecomp.config;
2
3 import org.junit.Test;
4
5 import java.util.Arrays;
6 import java.util.List;
7
8 import static org.junit.Assert.assertTrue;
9
10 public class ConfigurationUtilsTest {
11     @Test
12     public void testCommaList() {
13         List list = Arrays.asList("1", "2", 3);
14         String commaSeparatedList = ConfigurationUtils.getCommaSeparatedList(list);
15         list.forEach(o -> assertTrue(commaSeparatedList.contains(o.toString())));
16     }
17
18     @Test
19     public void testCommaListWithNullAndEmptyStrings() {
20         List list = Arrays.asList(null, "", " ");
21         String commaSeparatedList = ConfigurationUtils.getCommaSeparatedList(list);
22         assertTrue(commaSeparatedList.isEmpty());
23     }
24 }