From d365b10b5d9320e336e907f5f330a78503305878 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Tue, 29 Sep 2015 09:13:22 +0200 Subject: [PATCH] Improve test --- .../sonar/batch/scan/ProjectReactorBuilderTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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,10 +593,18 @@ public class ProjectReactorBuilderTest { public void shouldGetList() { Map 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 props = new HashMap<>(); + + props.put("prop", ""); + assertThat(ProjectReactorBuilder.getListFromProperty(props, "prop")).isEmpty(); + } + @Test public void shouldGetListFromFile() throws IOException { String filePath = "shouldGetList/foo.properties"; -- 2.39.5