use of org.sonarqube.ws.Settings.Setting in project sonarqube by SonarSource.
the class SettingsTest method get_default_value.
@Test
public void get_default_value() {
Setting setting = getSetting(PLUGIN_SETTING_KEY, anonymousSettingsService);
assertThat(setting.getValue()).isEqualTo("aDefaultValue");
assertThat(setting.getInherited()).isTrue();
}
use of org.sonarqube.ws.Settings.Setting in project sonarqube by SonarSource.
the class SettingsTest method getSetting.
@CheckForNull
private static Setting getSetting(String key, SettingsService settingsService) {
ValuesWsResponse response = settingsService.values(ValuesRequest.builder().setKeys(key).build());
List<Settings.Setting> settings = response.getSettingsList();
return settings.isEmpty() ? null : settings.get(0);
}
Aggregations