diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-09-29 09:13:22 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-10-01 11:54:05 +0200 |
commit | d365b10b5d9320e336e907f5f330a78503305878 (patch) | |
tree | b4522fa64e18dcebf2b020b7577045daef9251f4 | |
parent | 33cbe7daa7722a29e115ad9343a448c561d875a9 (diff) | |
download | sonarqube-d365b10b5d9320e336e907f5f330a78503305878.tar.gz sonarqube-d365b10b5d9320e336e907f5f330a78503305878.zip |
Improve test
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/scan/ProjectReactorBuilderTest.java | 10 |
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); |