use of org.sonarqube.ws.ProjectLinks.SearchWsResponse in project sonarqube by SonarSource.
the class SearchActionTest method request_by_project_id.
@Test
public void request_by_project_id() {
ComponentDto project = db.components().insertPrivateProject();
ProjectLinkDto link = db.componentLinks().insertCustomLink(project);
logInAsProjectAdministrator(project);
SearchWsResponse response = callByUuid(project.uuid());
assertThat(response.getLinksList()).extracting(Link::getId, Link::getName).containsExactlyInAnyOrder(tuple(link.getUuid(), link.getName()));
}
use of org.sonarqube.ws.ProjectLinks.SearchWsResponse in project sonarqube by SonarSource.
the class SearchActionTest method project_administrator_can_search_for_links.
@Test
public void project_administrator_can_search_for_links() {
ComponentDto project = db.components().insertPrivateProject();
ProjectLinkDto link = db.componentLinks().insertCustomLink(project);
userSession.logIn().addProjectPermission(UserRole.ADMIN, project);
SearchWsResponse response = callByKey(project.getKey());
assertThat(response.getLinksList()).extracting(Link::getId, Link::getName).containsExactlyInAnyOrder(tuple(link.getUuid(), link.getName()));
}
use of org.sonarqube.ws.ProjectLinks.SearchWsResponse in project sonarqube by SonarSource.
the class SearchActionTest method request_by_project_key.
@Test
public void request_by_project_key() {
ComponentDto project = db.components().insertPrivateProject();
ProjectLinkDto link = db.componentLinks().insertCustomLink(project);
logInAsProjectAdministrator(project);
SearchWsResponse response = callByKey(project.getKey());
assertThat(response.getLinksList()).extracting(Link::getId, Link::getName).containsExactlyInAnyOrder(tuple(link.getUuid(), link.getName()));
}
Aggregations