diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-09-15 16:24:36 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-09-16 13:36:49 +0200 |
commit | 1d6a79e5221587c98f451b233b99eeea7d66f4d7 (patch) | |
tree | 6b7c5260bd14d3bcce06cc7fdc44eedd18d9caf5 /src/test/java/org/sonarsource/scanner/cli/CliTest.java | |
parent | 12c373fad66da9ccb9cfb2ce7e3c5d2de4f60fe2 (diff) | |
download | sonar-scanner-cli-1d6a79e5221587c98f451b233b99eeea7d66f4d7.tar.gz sonar-scanner-cli-1d6a79e5221587c98f451b233b99eeea7d66f4d7.zip |
SQSCANNER-23 Support the new 'MessageException' unchecked exception and log by default the error stack trace only when a non-MessageException is thrown
Diffstat (limited to 'src/test/java/org/sonarsource/scanner/cli/CliTest.java')
-rw-r--r-- | src/test/java/org/sonarsource/scanner/cli/CliTest.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/java/org/sonarsource/scanner/cli/CliTest.java b/src/test/java/org/sonarsource/scanner/cli/CliTest.java index 840f35b..640ca8d 100644 --- a/src/test/java/org/sonarsource/scanner/cli/CliTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/CliTest.java @@ -35,7 +35,6 @@ public class CliTest { cli.parse(new String[0]); assertThat(cli.properties()).isNotEmpty(); assertThat(cli.isDebugEnabled()).isFalse(); - assertThat(cli.isDisplayStackTrace()).isFalse(); assertThat(cli.isDisplayVersionOnly()).isFalse(); } @@ -48,6 +47,11 @@ public class CliTest { } @Test + public void should_not_fail_with_errors_option() { + cli.parse(new String[] {"-e"}); + } + + @Test public void should_parse_optional_task() { cli.parse(new String[] {"-D", "foo=bar"}); assertThat(cli.properties().get("sonar.task")).isNull(); @@ -67,7 +71,6 @@ public class CliTest { public void should_enable_stacktrace_log() { cli.parse(new String[] {"-e"}); assertThat(cli.isDebugEnabled()).isFalse(); - assertThat(cli.isDisplayStackTrace()).isTrue(); assertThat(cli.properties().get("sonar.verbose")).isNull(); } @@ -75,7 +78,6 @@ public class CliTest { public void should_disable_debug_mode_and_stacktrace_log_by_default() { cli.parse(new String[0]); assertThat(cli.isDebugEnabled()).isFalse(); - assertThat(cli.isDisplayStackTrace()).isFalse(); assertThat(cli.properties().get("sonar.verbose")).isNull(); } |