aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-03-27 18:07:50 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2014-03-27 18:07:50 +0100
commit1be132a9942658d95d8c987ea666d221e048895b (patch)
treea8ae60c3d9df469cee7e80639d5fd1cf48a6c13a /sonar-batch
parente1e00988b648800705f31b121307381d2da1568a (diff)
downloadsonarqube-1be132a9942658d95d8c987ea666d221e048895b.tar.gz
sonarqube-1be132a9942658d95d8c987ea666d221e048895b.zip
Fix test
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/scan/ScanTaskTest.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/ScanTaskTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/ScanTaskTest.java
index 4567ab9af9e..a392a8050f3 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/scan/ScanTaskTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/scan/ScanTaskTest.java
@@ -19,16 +19,17 @@
*/
package org.sonar.batch.scan;
-import org.sonar.core.resource.ResourceDao;
-
import org.junit.Test;
import org.sonar.api.CoreProperties;
+import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.bootstrap.ProjectReactor;
import org.sonar.api.config.Settings;
import org.sonar.api.platform.ComponentContainer;
import org.sonar.batch.ProjectConfigurator;
import org.sonar.batch.bootstrap.TaskContainer;
import org.sonar.batch.phases.Phases;
+import org.sonar.core.resource.ResourceDao;
+
import static org.fest.assertions.Assertions.assertThat;
import static org.mockito.Mockito.mock;
@@ -43,7 +44,9 @@ public class ScanTaskTest {
public void should_enable_all_phases() {
ScanTask task = new ScanTask(mock(TaskContainer.class));
ComponentContainer projectScanContainer = new ComponentContainer();
- projectScanContainer.add(mock(ProjectConfigurator.class), mock(ProjectReactor.class), mock(Settings.class), mock(ProjectSettingsReady.class), mock(ResourceDao.class));
+ projectScanContainer.add(mock(ProjectConfigurator.class), new ProjectReactor(ProjectDefinition.create().setProperty(CoreProperties.PROJECT_KEY_PROPERTY, "foo")),
+ mock(Settings.class), mock(ProjectSettingsReady.class),
+ mock(ResourceDao.class));
task.scan(projectScanContainer);
Phases phases = projectScanContainer.getComponentByType(Phases.class);