aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/test/java/org/sonar/batch
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2016-05-11 12:21:22 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2016-05-12 08:49:09 +0200
commit42dc2978d58ca7f0860a62e6184dcc8e64d21346 (patch)
tree4602a1105050a1a0b604c2780fde335a903cf33b /sonar-scanner-engine/src/test/java/org/sonar/batch
parentd04b0fde3f735f89e37b15bcef26b44379a13e6e (diff)
downloadsonarqube-42dc2978d58ca7f0860a62e6184dcc8e64d21346.tar.gz
sonarqube-42dc2978d58ca7f0860a62e6184dcc8e64d21346.zip
SONAR-7612 Apply feedback
Diffstat (limited to 'sonar-scanner-engine/src/test/java/org/sonar/batch')
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/batch/postjob/DefaultPostJobContextTest.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/batch/postjob/DefaultPostJobContextTest.java b/sonar-scanner-engine/src/test/java/org/sonar/batch/postjob/DefaultPostJobContextTest.java
index 5f9916919ec..803b6177eb7 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/batch/postjob/DefaultPostJobContextTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/batch/postjob/DefaultPostJobContextTest.java
@@ -22,6 +22,7 @@ package org.sonar.batch.postjob;
import java.util.Arrays;
import org.junit.Before;
import org.junit.Test;
+import org.sonar.api.batch.AnalysisMode;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.postjob.issue.PostJobIssue;
import org.sonar.api.batch.rule.Severity;
@@ -41,17 +42,21 @@ public class DefaultPostJobContextTest {
private BatchComponentCache resourceCache;
private DefaultPostJobContext context;
private Settings settings;
+ private AnalysisMode analysisMode;
@Before
public void prepare() {
issueCache = mock(IssueCache.class);
resourceCache = new BatchComponentCache();
settings = new Settings();
- context = new DefaultPostJobContext(settings, issueCache, resourceCache);
+ analysisMode = mock(AnalysisMode.class);
+ context = new DefaultPostJobContext(settings, issueCache, resourceCache, analysisMode);
}
@Test
- public void test() {
+ public void testIssues() {
+ when(analysisMode.isIssues()).thenReturn(true);
+
assertThat(context.settings()).isSameAs(settings);
TrackedIssue defaultIssue = new TrackedIssue();