@Test public void testComputeSourceDir() throws IOException { long buildId = 207924136; Build build = this.checkBuildAndReturn(buildId, false); tmpDir = Files.createTempDirectory("test_computesourcedir").toFile(); File repoDir = new File(tmpDir, "repo"); BuildToBeInspected toBeInspected = new BuildToBeInspected(build, null, ScannedBuildStatus.ONLY_FAIL, ""); JobStatus jobStatus = new JobStatus(tmpDir.getAbsolutePath()+"/repo"); jobStatus.setFailingModulePath(repoDir.getAbsolutePath()); ProjectInspector inspector = ProjectInspectorMocker.mockProjectInspector(jobStatus, tmpDir, toBeInspected, CheckoutType.CHECKOUT_BUGGY_BUILD); CloneRepository cloneStep = new CloneRepository(inspector); ComputeSourceDir computeSourceDir = new ComputeSourceDir(inspector, true, false); cloneStep.addNextStep(new CheckoutBuggyBuild(inspector, true)) .addNextStep(computeSourceDir); cloneStep.execute(); assertThat(computeSourceDir.isShouldStop(), is(false)); List<StepStatus> stepStatusList = jobStatus.getStepStatuses(); assertThat(stepStatusList.size(), is(3)); StepStatus computeSourceDirStatus = stepStatusList.get(2); assertThat(computeSourceDirStatus.getStep(), is(computeSourceDir)); for (StepStatus stepStatus : stepStatusList) { assertThat(stepStatus.isSuccess(), is(true)); } assertThat(jobStatus.getRepairSourceDir(), is(new File[] {new File(repoDir.getAbsolutePath()+"/src/main/java").getCanonicalFile()})); }
public ComputeSourceDir(ProjectInspector inspector, boolean blockingStep, boolean allModules) { super(inspector, blockingStep); this.allModules = allModules; }
ComputeSourceDir extends ComputeDir { public ComputeSourceDir(ProjectInspector inspector, boolean blockingStep, boolean allModules) { super(inspector, blockingStep); this.allModules = allModules; } }
ComputeSourceDir extends ComputeDir { public ComputeSourceDir(ProjectInspector inspector, boolean blockingStep, boolean allModules) { super(inspector, blockingStep); this.allModules = allModules; } ComputeSourceDir(ProjectInspector inspector, boolean blockingStep, boolean allModules); }
ComputeSourceDir extends ComputeDir { public ComputeSourceDir(ProjectInspector inspector, boolean blockingStep, boolean allModules) { super(inspector, blockingStep); this.allModules = allModules; } ComputeSourceDir(ProjectInspector inspector, boolean blockingStep, boolean allModules);  }
ComputeSourceDir extends ComputeDir { public ComputeSourceDir(ProjectInspector inspector, boolean blockingStep, boolean allModules) { super(inspector, blockingStep); this.allModules = allModules; } ComputeSourceDir(ProjectInspector inspector, boolean blockingStep, boolean allModules);   }