use of org.sonar.db.property.PropertyDto in project sonarqube by SonarSource.
the class SetActionTest method assertGlobalSetting.
private void assertGlobalSetting(String key, String value) {
PropertyDto result = dbClient.propertiesDao().selectGlobalProperty(key);
assertThat(result).extracting(PropertyDto::getKey, PropertyDto::getValue, PropertyDto::getResourceId).containsExactly(key, value, null);
}
use of org.sonar.db.property.PropertyDto in project sonarqube by SonarSource.
the class LogServerIdTest method log_partial_information_if_property_is_set_without_value.
@Test
public void log_partial_information_if_property_is_set_without_value() {
setProperty(CoreProperties.PERMANENT_SERVER_ID, "123456789");
PropertyDto dto = new PropertyDto().setKey(CoreProperties.ORGANISATION).setValue(null);
when(dbClient.propertiesDao().selectGlobalProperty(any(DbSession.class), eq(CoreProperties.ORGANISATION))).thenReturn(dto);
underTest.start();
verifyLog("\"123456789\"", "-", "-");
}
use of org.sonar.db.property.PropertyDto in project sonarqube by SonarSource.
the class LogServerIdTest method setProperty.
private void setProperty(String propertyKey, @Nullable String propertyValue) {
PropertyDto dto = null;
if (propertyValue != null) {
dto = new PropertyDto().setKey(propertyKey).setValue(propertyValue);
}
when(dbClient.propertiesDao().selectGlobalProperty(any(DbSession.class), eq(propertyKey))).thenReturn(dto);
}
use of org.sonar.db.property.PropertyDto in project sonarqube by SonarSource.
the class ClearRulesOverloadedDebtTest method insertSqaleProperty.
private void insertSqaleProperty() {
dbClient.propertiesDao().saveProperty(dbSession, new PropertyDto().setKey("sonar.sqale.licenseHash.secured").setValue("ABCD"));
dbSession.commit();
}
use of org.sonar.db.property.PropertyDto in project sonarqube by SonarSource.
the class GenerateActionTest method assertGlobalSetting.
private void assertGlobalSetting(String key, String value) {
PropertyDto result = dbClient.propertiesDao().selectGlobalProperty(key);
assertThat(result).extracting(PropertyDto::getKey, PropertyDto::getValue, PropertyDto::getResourceId).containsExactly(key, value, null);
}
Aggregations