From 1be132a9942658d95d8c987ea666d221e048895b Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Thu, 27 Mar 2014 18:07:50 +0100 Subject: [PATCH] Fix test --- .../src/test/java/org/sonar/batch/scan/ScanTaskTest.java | 9 ++++++--- 1 file 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); -- 2.39.5