use of org.sonar.alm.client.azure.GsonAzureProject in project sonarqube by SonarSource.
the class ListAzureProjectsActionTest method list_projects_alphabetically_sorted.
@Test
public void list_projects_alphabetically_sorted() {
mockClient(ImmutableList.of(new GsonAzureProject("BBB project", "BBB project description"), new GsonAzureProject("AAA project 1", "AAA project description"), new GsonAzureProject("zzz project", "zzz project description"), new GsonAzureProject("aaa project", "aaa project description")));
AlmSettingDto almSetting = insertAlmSetting();
ListAzureProjectsWsResponse response = ws.newRequest().setParam("almSetting", almSetting.getKey()).executeProtobuf(ListAzureProjectsWsResponse.class);
assertThat(response.getProjectsCount()).isEqualTo(4);
assertThat(response.getProjectsList()).extracting(AzureProject::getName, AzureProject::getDescription).containsExactly(tuple("aaa project", "aaa project description"), tuple("AAA project 1", "AAA project description"), tuple("BBB project", "BBB project description"), tuple("zzz project", "zzz project description"));
}
Aggregations