Search in sources :

Example 6 with SearchWsResponse

use of org.sonarqube.ws.WsProjectLinks.SearchWsResponse in project sonarqube by SonarSource.

the class SearchActionTest method request_by_project_key.

@Test
public void request_by_project_key() throws IOException {
    ComponentDto project = insertProject();
    insertHomepageLink(project.uuid());
    logInAsProjectAdministrator(project);
    SearchWsResponse response = callByKey(project.key());
    assertThat(response.getLinksCount()).isEqualTo(1);
    assertThat(response.getLinks(0).getName()).isEqualTo("Homepage");
}
Also used : ComponentDto(org.sonar.db.component.ComponentDto) SearchWsResponse(org.sonarqube.ws.WsProjectLinks.SearchWsResponse) Test(org.junit.Test)

Aggregations

SearchWsResponse (org.sonarqube.ws.WsProjectLinks.SearchWsResponse)6 Test (org.junit.Test)4 ComponentDto (org.sonar.db.component.ComponentDto)4 ComponentLinkDto (org.sonar.db.component.ComponentLinkDto)2 SearchWsRequest (org.sonarqube.ws.client.projectlinks.SearchWsRequest)1