use of org.sonarqube.ws.AlmSettings.ListDefinitionsWsResponse in project sonarqube by SonarSource.
the class ListDefinitionsActionTest method list_azure_settings.
@Test
public void list_azure_settings() {
UserDto user = db.users().insertUser();
userSession.logIn(user).setSystemAdministrator();
AlmSettingDto almSetting1 = db.almSettings().insertAzureAlmSetting();
AlmSettingDto almSetting2 = db.almSettings().insertAzureAlmSetting(setting -> setting.setUrl(null));
ListDefinitionsWsResponse wsResponse = ws.newRequest().executeProtobuf(ListDefinitionsWsResponse.class);
assertThat(wsResponse.getAzureList()).extracting(AlmSettingAzure::getKey, AlmSettingAzure::getUrl).containsExactlyInAnyOrder(tuple(almSetting1.getKey(), almSetting1.getUrl()), tuple(almSetting2.getKey(), ""));
}
use of org.sonarqube.ws.AlmSettings.ListDefinitionsWsResponse in project sonarqube by SonarSource.
the class ListDefinitionsActionTest method list_gitlab_settings.
@Test
public void list_gitlab_settings() {
UserDto user = db.users().insertUser();
userSession.logIn(user).setSystemAdministrator();
AlmSettingDto almSetting1 = db.almSettings().insertGitlabAlmSetting();
AlmSettingDto almSetting2 = db.almSettings().insertGitlabAlmSetting(setting -> setting.setUrl(null));
ListDefinitionsWsResponse wsResponse = ws.newRequest().executeProtobuf(ListDefinitionsWsResponse.class);
assertThat(wsResponse.getGitlabList()).extracting(AlmSettingGitlab::getKey, AlmSettingGitlab::getUrl).containsExactlyInAnyOrder(tuple(almSetting1.getKey(), almSetting1.getUrl()), tuple(almSetting2.getKey(), ""));
}
Aggregations