use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class ServicesIT method verifySuccessfulPutCallMultipartDataWithFile.
@Test(groups = { "integration", "service", "httpput", "response" }, description = "An integration test to verify a successful put call with parameters")
public void verifySuccessfulPutCallMultipartDataWithFile() {
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.put("post/4", new Request().setMultipartData(new HashMap<>()), new File("Jenkinsfile")).verifyEquals().message("");
// verify no issues
finish();
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class ServicesIT method overrideContentTypeTest.
@Test(groups = { "integration", "service", "headers" }, description = "An integration negative test to verify we can successfully change header values")
public void overrideContentTypeTest() {
JsonObject request = new JsonObject();
request.addProperty("title", "foo");
request.addProperty("body", "bar");
request.addProperty("userId", 2);
// use this object to verify the app looks as expected
Call call = this.calls.get();
call.setContentType(HTTP.ContentType.FORMDATA);
// perform some actions
call.post("posts/", new Request().setJsonPayload(request)).verifyEquals().code(404);
// verify no issues
finish();
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class ServicesIT method verifySuccessfulPutCallNoDataWithFile.
@Test(groups = { "integration", "service", "httpput", "response" }, description = "An integration test to verify a successful put call with parameters")
public void verifySuccessfulPutCallNoDataWithFile() {
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.put("post/4", new Request(), new File("Jenkinsfile")).verifyEquals().message("");
// verify no issues
finish();
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class ServicesIT method verifySuccessfulPostParamsCallNoData.
@Test(groups = { "integration", "service", "httppost", "response" }, description = "An integration test to verify a successful post call with parameters")
public void verifySuccessfulPostParamsCallNoData() {
Map<String, Object> params = new HashMap<>();
params.put("id", 4);
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.post("post/4", new Request().setUrlParams(params)).verifyEquals().objectData(simJson4);
// verify no issues
finish();
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class ServicesIT method verifySuccessfulPatchCallMultipartData.
@Test(groups = { "integration", "service", "httppatch", "response" }, description = "An integration test to verify a successful patch call with parameters")
public void verifySuccessfulPatchCallMultipartData() {
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
Map<String, Object> map = new HashMap<>();
map.put("hello", "world");
call.patch("post/4", new Request().setMultipartData(map)).verifyEquals().message("");
// verify no issues
finish();
}
Aggregations