Tabnine Logo
lv.ctco.cukes.http.facade
Code IndexAdd Tabnine to your IDE (free)

How to use lv.ctco.cukes.http.facade

Best Java code snippets using lv.ctco.cukes.http.facade (Showing top 20 results out of 315)

origin: lv.ctco.cukes/cukes-http

@Override
public void failureIsExpected() {
  this.facade.setExpectException(true);
}
origin: ctco/cukes

private RequestSpecification specification() {
  return requestFacade.value();
}
origin: lv.ctco.cukes/cukes-http

private String getPath(String path) {
  if (!StringUtils.isEmpty(facade.getResponsePrefix())) {
    return facade.getResponsePrefix() + path;
  } else {
    return path;
  }
}
origin: ctco/cukes

  @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", "");
  }
}
origin: ctco/cukes

  @When("^the client performs (.+) request on \"(.+)\"$")
  public void perform_Http_Request(String httpMethod, String url) throws Throwable {
    facade.setResponsePrefix("");
    facade.doRequest(httpMethod, url);
  }
}
origin: lv.ctco.cukes/cukes-http

@Override
public void bodyContainsJsonPathValueContainingPhrase(String path, String phrase) {
  Response response = this.facade.response();
  assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), containsString(phrase)));
}
origin: lv.ctco.cukes/cukes-http

@Inject
public HttpRequestFacade(GlobalWorldFacade world, RestAssuredConfiguration restConfig) {
  this.world = world;
  this.restConfig = restConfig;
  initNewSpecification();
}
origin: lv.ctco.cukes/cukes-http

  @Given("^authentication type is \"(.+)\"$")
  public void authentication(String authenticationType) {
    this.facade.authenticationType(authenticationType);
  }
}
origin: lv.ctco.cukes/cukes-http

@Override
public void bodyContainsArrayWithSize(String path, String size) {
  Response response = this.facade.response();
  assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), ArrayWithSizeMatcher.arrayWithSize(size)));
}
origin: ctco/cukes

private RequestSpecification specification() {
  return requestFacade.value();
}
origin: ctco/cukes

@Inject
public HttpRequestFacade(GlobalWorldFacade world, RestAssuredConfiguration restConfig) {
  this.world = world;
  this.restConfig = restConfig;
  initNewSpecification();
}
origin: ctco/cukes

  @Given("^authentication type is \"(.+)\"$")
  public void authentication(String authenticationType) {
    this.facade.authenticationType(authenticationType);
  }
}
origin: ctco/cukes

@Override
public void failureIsExpected() {
  this.facade.setExpectException(true);
}
origin: ctco/cukes

private String getPath(String path) {
  if (!StringUtils.isEmpty(facade.getResponsePrefix())) {
    return facade.getResponsePrefix() + path;
  } else {
    return path;
  }
}
origin: lv.ctco.cukes/cukes-http

@Override
public void bodyContainsPathWithOtherValue(String path, String value) {
  Response response = this.facade.response();
  assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), EqualToIgnoringTypeMatcher.notEqualToIgnoringType(value)));
}
origin: lv.ctco.cukes/cukes-http

  @After
  public void afterScenario() {
    requestFacade.initNewSpecification();
  }
}
origin: ctco/cukes

@Override
public void bodyContainsPathOfType(String path, String type) {
  Response response = this.facade.response();
  assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), OfTypeMatcher.ofType(type)));
}
origin: ctco/cukes

  @After
  public void afterScenario() {
    requestFacade.initNewSpecification();
  }
}
origin: ctco/cukes

@Override
public void bodyContainsPathWithOtherValue(String path, String value) {
  Response response = this.facade.response();
  assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), EqualToIgnoringTypeMatcher.notEqualToIgnoringType(value)));
}
origin: lv.ctco.cukes/cukes-http

@Override
public void bodyContainsPathOfType(String path, String type) {
  Response response = this.facade.response();
  assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), OfTypeMatcher.ofType(type)));
}
lv.ctco.cukes.http.facade

Most used classes

  • HttpRequestFacade
  • HttpResponseFacade
  • HttpAssertionFacade
  • HttpAssertionFacadeImpl
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now