aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2016-09-16 14:19:57 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2016-09-16 14:19:57 +0200
commit95cd67ff399d2fc14fc01ef3ac3bd0bebb163c69 (patch)
tree2e155146ad5b6a4c8b28d6678471a128145f9a36 /src/test
parent50d0137a8aadc95a85848f76df214eba5016c216 (diff)
downloadsonar-scanner-cli-95cd67ff399d2fc14fc01ef3ac3bd0bebb163c69.tar.gz
sonar-scanner-cli-95cd67ff399d2fc14fc01ef3ac3bd0bebb163c69.zip
Improve coverage
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/sonarsource/scanner/cli/LogsTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/java/org/sonarsource/scanner/cli/LogsTest.java b/src/test/java/org/sonarsource/scanner/cli/LogsTest.java
index cc8ab38..bda9d28 100644
--- a/src/test/java/org/sonarsource/scanner/cli/LogsTest.java
+++ b/src/test/java/org/sonarsource/scanner/cli/LogsTest.java
@@ -51,6 +51,21 @@ public class LogsTest {
verify(stdOut).println("INFO: info");
verifyNoMoreInteractions(stdOut, stdErr);
}
+
+ @Test
+ public void testWarn() {
+ logs.warn("warn");
+ verify(stdErr).println("WARN: warn");
+ verifyNoMoreInteractions(stdOut, stdErr);
+ }
+
+ @Test
+ public void testWarnWithTimestamp() {
+ logs.setDebugEnabled(true);
+ logs.warn("warn");
+ verify(stdErr).println(Matchers.matches("\\d\\d:\\d\\d:\\d\\d.\\d\\d\\d WARN: warn"));
+ verifyNoMoreInteractions(stdOut, stdErr);
+ }
@Test
public void testError() {