use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectReactorValidatorTest method fail_with_backslash_in_key.
@Test
public void fail_with_backslash_in_key() {
ProjectReactor reactor = createProjectReactor("foo\\bar");
thrown.expect(MessageException.class);
thrown.expectMessage("\"foo\\bar\" is not a valid project or module key");
validator.validate(reactor);
}
use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectReactorValidatorTest method fail_with_invalid_branch.
@Test
public void fail_with_invalid_branch() {
ProjectReactor reactor = createProjectReactor("foo", "bran#ch");
thrown.expect(MessageException.class);
thrown.expectMessage("\"bran#ch\" is not a valid branch name");
validator.validate(reactor);
}
use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectReactorValidatorTest method fail_with_colon_in_branch.
@Test
public void fail_with_colon_in_branch() {
ProjectReactor reactor = createProjectReactor("foo", "bran:ch");
thrown.expect(MessageException.class);
thrown.expectMessage("\"bran:ch\" is not a valid branch name");
validator.validate(reactor);
}
use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectReactorValidatorTest method fail_with_deprecated_sonar_phase.
@Test
public void fail_with_deprecated_sonar_phase() {
ProjectReactor reactor = createProjectReactor("foo");
settings.setProperty("sonar.phase", "phase");
thrown.expect(MessageException.class);
thrown.expectMessage("\"sonar.phase\" is deprecated");
validator.validate(reactor);
}
use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectSettingsTest method should_not_fail_when_accessing_secured_properties.
@Test
public void should_not_fail_when_accessing_secured_properties() {
Table<String, String, String> settings = HashBasedTable.create();
settings.put("struts", "sonar.foo.secured", "bar");
settings.put("struts", "sonar.foo.license.secured", "bar2");
projectRef = new ProjectRepositories(settings, emptyFileData, null);
ProjectSettings batchSettings = new ProjectSettings(new ProjectReactor(project), bootstrapProps, projectRef, mode);
assertThat(batchSettings.getString("sonar.foo.license.secured")).isEqualTo("bar2");
assertThat(batchSettings.getString("sonar.foo.secured")).isEqualTo("bar");
}
Aggregations