From 95cd67ff399d2fc14fc01ef3ac3bd0bebb163c69 Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Fri, 16 Sep 2016 14:19:57 +0200 Subject: Improve coverage --- src/test/java/org/sonarsource/scanner/cli/LogsTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') 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() { -- cgit v1.2.3