use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesIT method checkGetResponseContainsBadArrayDataTest.
@Test(groups = { "integration", "services", "httpget" }, description = "An integration test to verify the data from a get call")
public void checkGetResponseContainsBadArrayDataTest() {
JsonObject json = new JsonObject();
json.addProperty("userId", 3);
json.addProperty("id", 1);
json.addProperty("title", "sunt aut facere repellat provident occaecati excepturi optio reprehenderit");
json.addProperty("body", "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto");
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.get("posts").assertContains(json);
// verify 1 issue
finish(1);
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesIT method comparePatchResponseBadCode201Test.
@Test(groups = { "integration", "services", "httppatch" }, description = "A negative integration test to verify the response code from a patch call")
public void comparePatchResponseBadCode201Test() {
JsonObject request = new JsonObject();
request.addProperty("id", 1);
request.addProperty("title", "foo1");
request.addProperty("body", "bar");
request.addProperty("userId", 4);
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.patch("posts/4", new Request(request)).assertEquals(201);
// verify one issue
finish(1);
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesIT method compareGetResponseObjectDataTest.
@Test(groups = { "integration", "services", "httpget" }, description = "An integration test to verify the data from a get call")
public void compareGetResponseObjectDataTest() {
JsonObject response = new JsonObject();
response.addProperty("userId", 1);
response.addProperty("id", 6);
response.addProperty("title", "dolorem eum magni eos aperiam quia");
response.addProperty("body", "ut aspernatur corporis harum nihil quis provident sequi\nmollitia nobis aliquid molestiae\nperspiciatis et ea nemo ab reprehenderit accusantium quas\nvoluptate dolores velit et doloremque molestiae");
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.get("posts/6").assertEquals(response);
// verify no issues
finish();
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesIT method compareDeleteResponseBadCode201Test.
@Test(groups = { "integration", "services", "httpdelete" }, description = "A negative integration test to verify the response code from a delete call")
public void compareDeleteResponseBadCode201Test() {
JsonObject request = new JsonObject();
request.addProperty("id", 1);
request.addProperty("title", "foo1");
request.addProperty("body", "bar");
request.addProperty("userId", 5);
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.delete("posts/5", new Request(request)).assertEquals(201);
// verify one issue
finish(1);
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesIT method checkGetParamsResponseContainsMultipleObjectDataTest.
@Test(groups = { "integration", "services", "httpget" }, description = "An integration test to verify the data from a get call")
public void checkGetParamsResponseContainsMultipleObjectDataTest() {
Map<String, String> params = new HashMap<>();
params.put("userId", "6");
Map<String, String> responsePairs = new HashMap<>();
responsePairs.put("userId", "1");
responsePairs.put("id", "6");
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.get("posts/6", new Request(params)).assertContains(responsePairs);
// verify no issues
finish();
}
Aggregations