From ad2404f5e32a7861b7afa6baa4f9f812cb85ef23 Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Fri, 16 Sep 2016 13:47:18 +0200 Subject: [PATCH] Improve tests --- src/test/java/org/sonarsource/scanner/cli/MainTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/sonarsource/scanner/cli/MainTest.java b/src/test/java/org/sonarsource/scanner/cli/MainTest.java index dc4b77d..abf5fc0 100644 --- a/src/test/java/org/sonarsource/scanner/cli/MainTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/MainTest.java @@ -92,12 +92,11 @@ public class MainTest { verify(runner).stop(); verify(exit).exit(Exit.ERROR); verify(logs).error("Caused by: NPE"); - } @Test public void show_error() { - Exception e = createException(false, false); + Exception e = createException(false); testException(e, false); verify(logs).error("Error during SonarQube Scanner execution"); @@ -106,7 +105,7 @@ public class MainTest { @Test public void show_error_MessageException() { - Exception e = createException(false, true); + Exception e = createException(true); testException(e, false); verify(logs).error("Error during SonarQube Scanner execution"); @@ -115,7 +114,7 @@ public class MainTest { @Test public void show_error_debug() { - Exception e = createException(true, false); + Exception e = createException(false); testException(e, true); verify(logs).error("Error during SonarQube Scanner execution", e); @@ -136,7 +135,7 @@ public class MainTest { verify(exit).exit(Exit.ERROR); } - private Exception createException(boolean debugEnabled, boolean messageException) { + private Exception createException(boolean messageException) { Exception e; if (messageException) { e = new MessageException("my message"); -- 2.39.5