use of org.sonarqube.ws.client.PostRequest in project sonarqube by SonarSource.
the class QualityGatesServiceTest method create_condition.
@Test
public void create_condition() {
underTest.createCondition(CreateConditionRequest.builder().setQualityGateId(10).setMetricKey("metric").setOperator("LT").setWarning("warning").setError("error").setPeriod(1).build());
PostRequest request = serviceTester.getPostRequest();
assertThat(serviceTester.getPostParser()).isSameAs(CreateConditionWsResponse.parser());
serviceTester.assertThat(request).hasPath("create_condition").hasParam(PARAM_GATE_ID, 10).hasParam(PARAM_METRIC, "metric").hasParam(PARAM_OPERATOR, "LT").hasParam(PARAM_WARNING, "warning").hasParam(PARAM_ERROR, "error").hasParam(PARAM_PERIOD, 1).andNoOtherParam();
}
use of org.sonarqube.ws.client.PostRequest in project sonarqube by SonarSource.
the class FavoritesService method remove.
public void remove(String component) {
PostRequest post = new PostRequest(path(ACTION_REMOVE)).setParam(PARAM_COMPONENT, component);
call(post);
}
use of org.sonarqube.ws.client.PostRequest in project sonarqube by SonarSource.
the class FavoritesService method add.
public void add(String component) {
PostRequest post = new PostRequest(path(ACTION_ADD)).setParam(PARAM_COMPONENT, component);
call(post);
}
use of org.sonarqube.ws.client.PostRequest in project sonarqube by SonarSource.
the class OrganizationService method delete.
public void delete(@Nullable String key) {
PostRequest post = new PostRequest(path("delete")).setParam("key", key);
call(post).failIfNotSuccessful();
}
use of org.sonarqube.ws.client.PostRequest in project sonarqube by SonarSource.
the class RootsService method unsetRoot.
public void unsetRoot(String login) {
PostRequest post = new PostRequest(path("unset_root")).setParam("login", login);
call(post);
}
Aggregations