aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/sonarsource/scanner
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/sonarsource/scanner')
-rw-r--r--src/test/java/org/sonarsource/scanner/cli/MainTest.java2
-rw-r--r--src/test/java/org/sonarsource/scanner/cli/StatsTest.java3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/test/java/org/sonarsource/scanner/cli/MainTest.java b/src/test/java/org/sonarsource/scanner/cli/MainTest.java
index 7b6ccfd..48b2ed3 100644
--- a/src/test/java/org/sonarsource/scanner/cli/MainTest.java
+++ b/src/test/java/org/sonarsource/scanner/cli/MainTest.java
@@ -61,6 +61,7 @@ class MainTest {
void setUp() {
when(scannerEngineBootstrapperFactory.create(any(Properties.class), any(String.class))).thenReturn(bootstrapper);
when(bootstrapper.bootstrap()).thenReturn(engine);
+ when(engine.analyze(any())).thenReturn(true);
when(conf.properties()).thenReturn(properties);
}
@@ -223,7 +224,6 @@ class MainTest {
inOrder.verify(exit, times(1)).exit(Exit.SUCCESS);
inOrder.verify(scannerEngineBootstrapperFactory, times(1)).create(p, "");
- inOrder.verify(exit, times(1)).exit(Exit.SUCCESS);
}
@Test
diff --git a/src/test/java/org/sonarsource/scanner/cli/StatsTest.java b/src/test/java/org/sonarsource/scanner/cli/StatsTest.java
index 4895640..174acbc 100644
--- a/src/test/java/org/sonarsource/scanner/cli/StatsTest.java
+++ b/src/test/java/org/sonarsource/scanner/cli/StatsTest.java
@@ -34,9 +34,8 @@ class StatsTest {
void shouldPrintStats() {
new Stats().start().stop();
- assertThat(logTester.logs(Level.INFO)).hasSize(2);
+ assertThat(logTester.logs(Level.INFO)).hasSize(1);
assertThat(logTester.logs(Level.INFO).get(0)).startsWith("Total time: ");
- assertThat(logTester.logs(Level.INFO).get(1)).startsWith("Final Memory: ");
}
@Test