aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-batch/src')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/scan/ProjectReactorBuilderTest.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectReactorBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectReactorBuilderTest.java
index b55f0c64e31..e5206b732c3 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectReactorBuilderTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/scan/ProjectReactorBuilderTest.java
@@ -593,11 +593,19 @@ public class ProjectReactorBuilderTest {
public void shouldGetList() {
Map<String, String> props = new HashMap<>();
- props.put("prop", " foo , bar , \n\ntoto,tutu");
+ props.put("prop", " foo ,, bar , \n\ntoto,tutu");
assertThat(ProjectReactorBuilder.getListFromProperty(props, "prop")).containsOnly("foo", "bar", "toto", "tutu");
}
@Test
+ public void shouldGetEmptyList() {
+ Map<String, String> props = new HashMap<>();
+
+ props.put("prop", "");
+ assertThat(ProjectReactorBuilder.getListFromProperty(props, "prop")).isEmpty();
+ }
+
+ @Test
public void shouldGetListFromFile() throws IOException {
String filePath = "shouldGetList/foo.properties";
Map<String, String> props = loadPropsFromFile(filePath);