@Override public void failureIsExpected() { this.facade.setExpectException(true); }
private RequestSpecification specification() { return requestFacade.value(); }
private String getPath(String path) { if (!StringUtils.isEmpty(facade.getResponsePrefix())) { return facade.getResponsePrefix() + path; } else { return path; } }
@When("^the query is executed$") public void execute_Query() throws Throwable { String contentType = ContentType.JSON.toString(); requestFacade.accept(contentType); requestFacade.contentType(contentType); responseFacade.setResponsePrefix("data."); responseFacade.doRequest("POST", ""); } }
@When("^the client performs (.+) request on \"(.+)\"$") public void perform_Http_Request(String httpMethod, String url) throws Throwable { facade.setResponsePrefix(""); facade.doRequest(httpMethod, url); } }
@Inject public HttpRequestFacade(GlobalWorldFacade world, RestAssuredConfiguration restConfig) { this.world = world; this.restConfig = restConfig; initNewSpecification(); }
@Given("^authentication type is \"(.+)\"$") public void authentication(String authenticationType) { this.facade.authenticationType(authenticationType); } }
private RequestSpecification specification() { return requestFacade.value(); }
@Inject public HttpRequestFacade(GlobalWorldFacade world, RestAssuredConfiguration restConfig) { this.world = world; this.restConfig = restConfig; initNewSpecification(); }
@Given("^authentication type is \"(.+)\"$") public void authentication(String authenticationType) { this.facade.authenticationType(authenticationType); } }
@Override public void failureIsExpected() { this.facade.setExpectException(true); }
private String getPath(String path) { if (!StringUtils.isEmpty(facade.getResponsePrefix())) { return facade.getResponsePrefix() + path; } else { return path; } }
@After public void afterScenario() { requestFacade.initNewSpecification(); } }
@After public void afterScenario() { requestFacade.initNewSpecification(); } }