use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectLockTest method setUpTest.
private ProjectLock setUpTest(File file) {
ProjectReactor projectReactor = mock(ProjectReactor.class);
ProjectDefinition projectDefinition = mock(ProjectDefinition.class);
when(projectReactor.getRoot()).thenReturn(projectDefinition);
when(projectDefinition.getWorkDir()).thenReturn(file);
return new ProjectLock(projectReactor);
}
use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectReactorBuilderTest method loadProjectDefinition.
private ProjectDefinition loadProjectDefinition(String projectFolder) {
Map<String, String> props = loadProps(projectFolder);
AnalysisProperties bootstrapProps = new AnalysisProperties(props, null);
ProjectReactor projectReactor = new ProjectReactorBuilder(bootstrapProps).execute();
return projectReactor.getRoot();
}
use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectReactorValidatorTest method not_fail_with_dash_key.
@Test
public void not_fail_with_dash_key() {
ProjectReactor reactor = createProjectReactor("foo-bar");
validator.validate(reactor);
}
use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectSettingsTest method should_load_project_root_settings.
@Test
public void should_load_project_root_settings() {
Table<String, String, String> settings = HashBasedTable.create();
settings.put("struts", "sonar.cpd.cross", "true");
settings.put("struts", "sonar.java.coveragePlugin", "jacoco");
projectRef = new ProjectRepositories(settings, emptyFileData, null);
ProjectSettings batchSettings = new ProjectSettings(new ProjectReactor(project), bootstrapProps, projectRef, mode);
assertThat(batchSettings.getString("sonar.java.coveragePlugin")).isEqualTo("jacoco");
}
use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectReactorValidatorTest method not_fail_with_underscore_key.
@Test
public void not_fail_with_underscore_key() {
ProjectReactor reactor = createProjectReactor("foo_bar");
validator.validate(reactor);
}
Aggregations