use of org.sonar.scanner.repository.ProjectRepositories in project sonarqube by SonarSource.
the class StatusDetectionTest method detect_status.
@Test
public void detect_status() {
Table<String, String, String> t = ImmutableTable.of();
ProjectRepositories ref = new ProjectRepositories(t, createTable(), null);
StatusDetection statusDetection = new StatusDetection(ref);
assertThat(statusDetection.status("foo", "src/Foo.java", "ABCDE")).isEqualTo(InputFile.Status.SAME);
assertThat(statusDetection.status("foo", "src/Foo.java", "XXXXX")).isEqualTo(InputFile.Status.CHANGED);
assertThat(statusDetection.status("foo", "src/Other.java", "QWERT")).isEqualTo(InputFile.Status.ADDED);
}
use of org.sonar.scanner.repository.ProjectRepositories 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");
}
Aggregations