aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2016-09-16 13:47:18 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2016-09-16 13:54:26 +0200
commitad2404f5e32a7861b7afa6baa4f9f812cb85ef23 (patch)
treea6c98bcbf7d69d12f7d14e5f8315a3447f159613 /src/test
parent1d6a79e5221587c98f451b233b99eeea7d66f4d7 (diff)
downloadsonar-scanner-cli-ad2404f5e32a7861b7afa6baa4f9f812cb85ef23.tar.gz
sonar-scanner-cli-ad2404f5e32a7861b7afa6baa4f9f812cb85ef23.zip
Improve tests
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/sonarsource/scanner/cli/MainTest.java9
1 files 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");