blob: d6bc1f637c27dbcc6f503c244523ad10909c9b15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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());
}
}
|