use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesIT method compareGetParamsResponseNullArrayDataTest.
@Test(groups = { "integration", "services", "httpget" }, description = "A negative integration test to verify the data from a get call")
public void compareGetParamsResponseNullArrayDataTest() {
Map<String, String> params = new HashMap<>();
params.put("userId", "6");
JsonObject response = new JsonObject();
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.get("posts", new Request(params)).assertEquals(response);
// verify one issue
finish(1);
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesIT method checkPostResponseContainsBadSingleDataTest.
@Test(groups = { "integration", "services", "httppost" }, description = "An integration test to verify the data from a post call")
public void checkPostResponseContainsBadSingleDataTest() {
JsonObject request = new JsonObject();
request.addProperty("title", "foo");
request.addProperty("body", "bar");
request.addProperty("userId", 2);
Map<String, String> responsePairs = new HashMap<>();
responsePairs.put("userId", "3");
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.post("posts/", new Request(request)).assertContains(responsePairs);
// verify 1 issue
finish(1);
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesIT method comparePutResponseCode404Test.
@Test(groups = { "integration", "services", "httpput" }, description = "An integration test to verify the response code from a put call")
public void comparePutResponseCode404Test() {
JsonObject request = new JsonObject();
request.addProperty("id", 1);
request.addProperty("title", "foo1");
request.addProperty("body", "bar");
request.addProperty("userId", 3);
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.put("post/", new Request(request)).assertEquals(404);
// verify no issues
finish();
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesIT method setHeaderTest.
@Test(groups = { "integration", "services", "headers" }, description = "An integration test to verify we can successfully set header values")
public void setHeaderTest() {
// use this object to verify the app looks as expected
Call call = this.calls.get();
// set some custom headers
Map<String, String> headers = new HashMap<>();
headers.put("X-Atlassian-Token", "no-check");
call.addHeaders(headers);
// perform some actions
call.get("posts/").assertEquals(200);
// verify no issues
finish();
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesIT method comparePostResponseBadCode400Test.
@Test(groups = { "integration", "services", "httppost" }, description = "A negative integration test to verify the response code from a post call")
public void comparePostResponseBadCode400Test() {
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();
// perform some actions
call.post("post/", new Request(request)).assertEquals(400);
// verify one issue
finish(1);
}
Aggregations