aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-01-22 10:06:26 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2013-01-22 10:06:26 +0100
commit6c62a2c27cc29c9a74a833f2226adbd734c132ff (patch)
treeaf087f3bf219f30bf050b50a63722d7b08834a57 /src
parente727146d35b4053e8703e57753356ea33710f9cc (diff)
downloadsonar-scanner-cli-6c62a2c27cc29c9a74a833f2226adbd734c132ff.tar.gz
sonar-scanner-cli-6c62a2c27cc29c9a74a833f2226adbd734c132ff.zip
Improve UT coverage.
Diffstat (limited to 'src')
-rw-r--r--src/test/java/org/sonar/runner/LogsTest.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/org/sonar/runner/LogsTest.java b/src/test/java/org/sonar/runner/LogsTest.java
index c28023f..19ce1cf 100644
--- a/src/test/java/org/sonar/runner/LogsTest.java
+++ b/src/test/java/org/sonar/runner/LogsTest.java
@@ -68,6 +68,13 @@ public class LogsTest {
}
@Test
+ public void shouldLogErrorWithoutThrowable() {
+ Logs.error("error", null);
+ assertThat(baosOut.toString()).isEmpty();
+ assertThat(baosErr.toString()).contains("ERROR: error");
+ }
+
+ @Test
public void shouldLogErrorWithThrowable() {
Logs.error("error", new SonarException());
assertThat(baosOut.toString()).isEmpty();