From 72593834c262678cb823fdd5f9ee01183fc06cdf Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 3 Sep 2014 11:46:33 +0200 Subject: [PATCH] Add minor test + remove sonar-dummy-app from analysis --- server/process/sonar-dummy-app/pom.xml | 4 ++++ .../src/test/java/org/sonar/process/PropsTest.java | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/server/process/sonar-dummy-app/pom.xml b/server/process/sonar-dummy-app/pom.xml index ded06395f6e..672d448acb7 100644 --- a/server/process/sonar-dummy-app/pom.xml +++ b/server/process/sonar-dummy-app/pom.xml @@ -93,4 +93,8 @@ + + + **/*.java + diff --git a/server/process/sonar-process/src/test/java/org/sonar/process/PropsTest.java b/server/process/sonar-process/src/test/java/org/sonar/process/PropsTest.java index 5d283b44f8f..6985b0ba086 100644 --- a/server/process/sonar-process/src/test/java/org/sonar/process/PropsTest.java +++ b/server/process/sonar-process/src/test/java/org/sonar/process/PropsTest.java @@ -29,7 +29,7 @@ import static org.fest.assertions.Fail.fail; public class PropsTest { @Test - public void of() throws Exception { + public void value() throws Exception { Properties p = new Properties(); p.setProperty("foo", "bar"); Props props = new Props(p); @@ -41,7 +41,7 @@ public class PropsTest { } @Test - public void intOf() throws Exception { + public void valueAsInt() throws Exception { Properties p = new Properties(); p.setProperty("foo", "33"); p.setProperty("blank", ""); @@ -56,7 +56,7 @@ public class PropsTest { } @Test - public void intOf_not_integer() throws Exception { + public void valueAsInt_not_integer() throws Exception { Properties p = new Properties(); p.setProperty("foo", "bar"); Props props = new Props(p); @@ -70,7 +70,7 @@ public class PropsTest { } @Test - public void booleanOf() throws Exception { + public void valueAsBoolean() throws Exception { Properties p = new Properties(); p.setProperty("foo", "True"); p.setProperty("bar", "false"); @@ -82,7 +82,7 @@ public class PropsTest { } @Test - public void booleanOf_default_value() throws Exception { + public void valueAsBoolean_default_value() throws Exception { Properties p = new Properties(); p.setProperty("foo", "true"); p.setProperty("bar", "false"); @@ -114,9 +114,11 @@ public class PropsTest { Props props = new Props(p); props.set("foo", "new_foo"); props.set("bar", "new_bar"); + props.set("null", null); assertThat(props.value("foo")).isEqualTo("new_foo"); assertThat(props.value("bar")).isEqualTo("new_bar"); + assertThat(props.value("null")).isNull(); } @Test -- 2.39.5