From 42dc2978d58ca7f0860a62e6184dcc8e64d21346 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Wed, 11 May 2016 12:21:22 +0200 Subject: SONAR-7612 Apply feedback --- .../java/org/sonar/batch/postjob/DefaultPostJobContextTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sonar-scanner-engine/src/test/java/org/sonar/batch') 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(); -- cgit v1.2.3