use of org.sonarqube.ws.client.PostRequest in project sonarqube by SonarSource.
the class ProjectLinksServiceTest method create_does_POST_request.
@Test
public void create_does_POST_request() {
underTest.create(new CreateWsRequest().setProjectId(PROJECT_ID_VALUE).setProjectKey(PROJECT_KEY_VALUE).setName(NAME_VALUE).setUrl(URL_VALUE));
assertThat(serviceTester.getPostParser()).isSameAs(CreateWsResponse.parser());
PostRequest postRequest = serviceTester.getPostRequest();
serviceTester.assertThat(postRequest).hasPath("create").hasParam(PARAM_PROJECT_ID, PROJECT_ID_VALUE).hasParam(PARAM_PROJECT_KEY, PROJECT_KEY_VALUE).hasParam(PARAM_NAME, NAME_VALUE).hasParam(PARAM_URL, URL_VALUE).andNoOtherParam();
}
use of org.sonarqube.ws.client.PostRequest in project sonarqube by SonarSource.
the class ProjectLinksServiceTest method delete_does_POST_request.
@Test
public void delete_does_POST_request() {
underTest.delete(new DeleteWsRequest().setId(ID_VALUE));
assertThat(serviceTester.getPostParser()).isNull();
PostRequest postRequest = serviceTester.getPostRequest();
serviceTester.assertThat(postRequest).hasPath("delete").hasParam(PARAM_ID, String.valueOf(ID_VALUE)).andNoOtherParam();
}
use of org.sonarqube.ws.client.PostRequest in project sonarqube by SonarSource.
the class QualityGatesServiceTest method create.
@Test
public void create() {
underTest.create("Default");
PostRequest request = serviceTester.getPostRequest();
assertThat(serviceTester.getPostParser()).isSameAs(CreateWsResponse.parser());
serviceTester.assertThat(request).hasParam(PARAM_NAME, "Default").andNoOtherParam();
}
use of org.sonarqube.ws.client.PostRequest in project sonarqube by SonarSource.
the class IssuesServiceTest method set_type.
@Test
public void set_type() {
underTest.setType(new SetTypeRequest("ABCD", "bugs"));
PostRequest request = serviceTester.getPostRequest();
assertThat(serviceTester.getPostParser()).isSameAs(Issues.Operation.parser());
serviceTester.assertThat(request).hasParam("issue", "ABCD").hasParam("type", "bugs").andNoOtherParam();
}
Aggregations