aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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() {