]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
Add more unit tests regarding the --embedded switch (#49)
authorAmaury Levé <amaury.leve@sonarsource.com>
Thu, 26 Apr 2018 09:11:04 +0000 (11:11 +0200)
committerGitHub <noreply@github.com>
Thu, 26 Apr 2018 09:11:04 +0000 (11:11 +0200)
src/test/java/org/sonarsource/scanner/cli/CliTest.java

index ad9d942307aa2462e54c8641d436b7df005907a5..82fba5d310f885cd25acf7f1be9e55ee9c08bcc1 100644 (file)
@@ -36,6 +36,7 @@ public class CliTest {
     assertThat(cli.properties()).isNotEmpty();
     assertThat(cli.isDebugEnabled()).isFalse();
     assertThat(cli.isDisplayVersionOnly()).isFalse();
+    assertThat(cli.isEmbedded()).isFalse();
   }
 
   @Test
@@ -143,4 +144,10 @@ public class CliTest {
     verify(logs).info("usage: sonar-scanner [options]");
     verify(exit).exit(Exit.ERROR);
   }
+
+  @Test
+  public void should_enable_embedded_mode() {
+    cli.parse(new String[] {"--embedded"});
+    assertThat(cli.isEmbedded()).isTrue();
+  }
 }