use of org.sonarqube.ws.client.GetRequest in project sonarqube by SonarSource.
the class PermissionsServiceTest method groups_does_POST_on_WS_groups.
@Test
public void groups_does_POST_on_WS_groups() {
GroupsWsRequest request = new GroupsWsRequest();
underTest.groups(request.setPermission(PERMISSION_VALUE).setProjectId(PROJECT_ID_VALUE).setProjectKey(PROJECT_KEY_VALUE).setPage(PAGE_VALUE).setPageSize(PAGE_SIZE_VALUE).setQuery(QUERY_VALUE));
assertThat(serviceTester.getGetParser()).isSameAs(WsPermissions.WsGroupsResponse.parser());
GetRequest getRequest = serviceTester.getGetRequest();
serviceTester.assertThat(getRequest).hasPath("groups").hasParam(PARAM_PERMISSION, PERMISSION_VALUE).hasParam(PARAM_PROJECT_ID, PROJECT_ID_VALUE).hasParam(PARAM_PROJECT_KEY, PROJECT_KEY_VALUE).hasParam(PARAM_P, PAGE_VALUE).hasParam(PARAM_PS, PAGE_SIZE_VALUE).hasParam(PARAM_Q, QUERY_VALUE).andNoOtherParam();
}
use of org.sonarqube.ws.client.GetRequest in project sonarqube by SonarSource.
the class PermissionsServiceTest method searchTemplates_does_GET_on_Ws_search_templates.
@Test
public void searchTemplates_does_GET_on_Ws_search_templates() {
underTest.searchTemplates(new SearchTemplatesWsRequest().setQuery(QUERY_VALUE));
assertThat(serviceTester.getGetParser()).isSameAs(WsPermissions.SearchTemplatesWsResponse.parser());
GetRequest getRequest = serviceTester.getGetRequest();
serviceTester.assertThat(getRequest).hasPath("search_templates").hasParam(PARAM_Q, QUERY_VALUE).andNoOtherParam();
}
use of org.sonarqube.ws.client.GetRequest in project sonarqube by SonarSource.
the class ProjectLinksServiceTest method search_does_GET_request.
@Test
public void search_does_GET_request() {
underTest.search(new SearchWsRequest().setProjectId(PROJECT_ID_VALUE).setProjectKey(PROJECT_KEY_VALUE));
assertThat(serviceTester.getGetParser()).isSameAs(SearchWsResponse.parser());
GetRequest getRequest = serviceTester.getGetRequest();
serviceTester.assertThat(getRequest).hasPath("search").hasParam(PARAM_PROJECT_ID, PROJECT_ID_VALUE).hasParam(PARAM_PROJECT_KEY, PROJECT_KEY_VALUE).andNoOtherParam();
}
use of org.sonarqube.ws.client.GetRequest in project sonarqube by SonarSource.
the class QualityGatesServiceTest method project_status.
@Test
public void project_status() {
underTest.projectStatus(new ProjectStatusWsRequest().setAnalysisId("analysisId").setProjectId("projectId").setProjectKey("projectKey"));
GetRequest getRequest = serviceTester.getGetRequest();
assertThat(serviceTester.getGetParser()).isSameAs(ProjectStatusWsResponse.parser());
serviceTester.assertThat(getRequest).hasParam(PARAM_ANALYSIS_ID, "analysisId").hasParam(PARAM_PROJECT_ID, "projectId").hasParam(PARAM_PROJECT_KEY, "projectKey").andNoOtherParam();
}
use of org.sonarqube.ws.client.GetRequest in project sonarqube by SonarSource.
the class CeServiceTest method activity.
@Test
public void activity() {
ActivityWsRequest request = new ActivityWsRequest().setComponentId(VALUE_COMPONENT_ID).setQuery(VALUE_QUERY).setStatus(ImmutableList.of(VALUE_TASK_STATUS_1, VALUE_TASK_STATUS_2)).setType(VALUE_TASK_TYPE).setPage(VALUE_PAGE).setPageSize(VALUE_PAGE_SIZE).setMaxExecutedAt(VALUE_MAX_EXECUTED_AT).setMinSubmittedAt(VALUE_MIN_SUBMITTED_AT).setOnlyCurrents(VALUE_ONLY_CURRENTS).setPage(1).setPageSize(1);
underTest.activity(request);
GetRequest result = serviceTester.getGetRequest();
assertThat(serviceTester.getGetParser()).isSameAs(ActivityResponse.parser());
serviceTester.assertThat(result).hasPath("activity").hasParam(PARAM_COMPONENT_ID, VALUE_COMPONENT_ID).hasParam("q", VALUE_QUERY).hasParam(PARAM_STATUS, VALUE_TASK_STATUS_1 + "," + VALUE_TASK_STATUS_2).hasParam(PARAM_TYPE, VALUE_TASK_TYPE).hasParam(PARAM_MAX_EXECUTED_AT, VALUE_MAX_EXECUTED_AT).hasParam(PARAM_MIN_SUBMITTED_AT, VALUE_MIN_SUBMITTED_AT).hasParam(PARAM_ONLY_CURRENTS, VALUE_ONLY_CURRENTS).hasParam("p", 1).hasParam("ps", 1).andNoOtherParam();
}
Aggregations