use of org.sonar.scanner.bootstrap.GlobalMode in project sonarqube by SonarSource.
the class GlobalModeTest method testDefault.
@Test
public void testDefault() {
GlobalMode mode = createMode(null, null);
assertThat(mode.isPreview()).isFalse();
assertThat(mode.isIssues()).isFalse();
assertThat(mode.isPublish()).isTrue();
}
use of org.sonar.scanner.bootstrap.GlobalMode in project sonarqube by SonarSource.
the class GlobalModeTest method testIssuesMode.
@Test
public void testIssuesMode() {
GlobalMode mode = createMode(CoreProperties.ANALYSIS_MODE, CoreProperties.ANALYSIS_MODE_ISSUES);
assertThat(mode.isPreview()).isFalse();
assertThat(mode.isIssues()).isTrue();
assertThat(mode.isPublish()).isFalse();
}
use of org.sonar.scanner.bootstrap.GlobalMode in project sonarqube by SonarSource.
the class GlobalModeTest method testOtherProperty.
@Test
public void testOtherProperty() {
GlobalMode mode = createMode(CoreProperties.ANALYSIS_MODE, CoreProperties.ANALYSIS_MODE_PUBLISH);
assertThat(mode.isPreview()).isFalse();
assertThat(mode.isIssues()).isFalse();
assertThat(mode.isPublish()).isTrue();
}
use of org.sonar.scanner.bootstrap.GlobalMode in project sonarqube by SonarSource.
the class GlobalModeTest method createMode.
private GlobalMode createMode(String key, String value) {
Map<String, String> map = new HashMap<>();
if (key != null) {
map.put(key, value);
}
GlobalProperties props = new GlobalProperties(map);
return new GlobalMode(props);
}
use of org.sonar.scanner.bootstrap.GlobalMode in project sonarqube by SonarSource.
the class ProjectSettingsTest method prepare.
@Before
public void prepare() {
emptyFileData = ImmutableTable.of();
emptySettings = ImmutableTable.of();
project = ProjectDefinition.create().setKey("struts");
globalMode = mock(GlobalMode.class);
mode = mock(DefaultAnalysisMode.class);
bootstrapProps = new GlobalSettings(new GlobalProperties(Collections.<String, String>emptyMap()), new PropertyDefinitions(), mock(SettingsLoader.class), globalMode);
}
Aggregations