use of org.sonar.api.config.Configuration in project sonarqube by SonarSource.
the class ConfigurationProviderTest method getStringArray_split_on_comma_trim_and_support_encoded_comma_as_Settings_getStringArray.
@Test
@UseDataProvider("trimFieldsAndEncodedCommas")
public void getStringArray_split_on_comma_trim_and_support_encoded_comma_as_Settings_getStringArray(String idemUseCase) {
settings.setProperty(nonDeclaredKey, idemUseCase);
settings.setProperty(nonMultivalueKey, idemUseCase);
settings.setProperty(multivalueKey, idemUseCase);
Configuration configuration = underTest.provide(settings);
getStringArrayBehaviorIsTheSame(configuration, nonDeclaredKey);
getStringArrayBehaviorIsTheSame(configuration, nonMultivalueKey);
getStringArrayBehaviorIsTheSame(configuration, multivalueKey);
}
use of org.sonar.api.config.Configuration in project sonarqube by SonarSource.
the class ConfigurationProviderTest method getStringArray_parses_empty_string_differently_from_Settings_ifmultivalue_property.
@Test
@UseDataProvider("emptyStrings")
public void getStringArray_parses_empty_string_differently_from_Settings_ifmultivalue_property(String emptyValue) {
settings.setProperty(multivalueKey, emptyValue);
Configuration configuration = underTest.provide(settings);
getStringArrayBehaviorDiffers(configuration, multivalueKey, EMPTY_STRING_ARRAY);
}
use of org.sonar.api.config.Configuration in project sonarqube by SonarSource.
the class ConfigurationProviderTest method getStringArray_on_unknown_or_non_multivalue_properties_ignores_subsequent_commas_as_Settings.
@Test
@UseDataProvider("subsequentCommas1")
public void getStringArray_on_unknown_or_non_multivalue_properties_ignores_subsequent_commas_as_Settings(String subsequentCommas) {
settings.setProperty(nonDeclaredKey, subsequentCommas);
settings.setProperty(nonMultivalueKey, subsequentCommas);
Configuration configuration = underTest.provide(settings);
getStringArrayBehaviorIsTheSame(configuration, nonDeclaredKey);
getStringArrayBehaviorIsTheSame(configuration, nonMultivalueKey);
}
use of org.sonar.api.config.Configuration in project sonarqube by SonarSource.
the class ConfigurationProviderTest method getStringArray_on_unknown_or_non_multivalue_properties_ignores_empty_fields_differently_from_settings.
@Test
@UseDataProvider("emptyFields2")
public void getStringArray_on_unknown_or_non_multivalue_properties_ignores_empty_fields_differently_from_settings(String emptyFields, String[] expected) {
settings.setProperty(nonDeclaredKey, emptyFields);
settings.setProperty(nonMultivalueKey, emptyFields);
Configuration configuration = underTest.provide(settings);
getStringArrayBehaviorDiffers(configuration, nonDeclaredKey, expected);
getStringArrayBehaviorDiffers(configuration, nonMultivalueKey, expected);
}
use of org.sonar.api.config.Configuration in project sonarqube by SonarSource.
the class ConfigurationProviderTest method getStringArray_parses_empty_string_the_same_Settings_if_unknown_or_non_multivalue_property.
@Test
@UseDataProvider("emptyStrings")
public void getStringArray_parses_empty_string_the_same_Settings_if_unknown_or_non_multivalue_property(String emptyValue) {
settings.setProperty(nonDeclaredKey, emptyValue);
settings.setProperty(nonMultivalueKey, emptyValue);
Configuration configuration = underTest.provide(settings);
getStringArrayBehaviorIsTheSame(configuration, nonDeclaredKey);
getStringArrayBehaviorIsTheSame(configuration, nonMultivalueKey);
}
Aggregations