use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesResponseAssertContainsIT method assertJsonCrumbsBadCrumbContain.
@Test(groups = { "integration", "service", "httpget", "response" }, description = "An integration test to verify json data response", expectedExceptions = AssertionError.class)
public void assertJsonCrumbsBadCrumbContain() {
Map<String, Object> values = new HashMap<>();
values.put("id", 4);
List<String> crumbs = new ArrayList<>();
crumbs.add("user");
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.get("posts/?id=4").assertContains().nestedKeyValues(crumbs, values);
// verify 1 issues
finish(1);
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesResponseAssertContainsIT method assertNestedKeysNoCrumb.
@Test(groups = { "integration", "service", "httpget", "response" }, description = "An integration test to verify json data response")
public void assertNestedKeysNoCrumb() {
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.get("ids/1").assertContains().nestedKeys(new ArrayList<>(), Collections.singletonList("ids"));
// verify no issues
finish();
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesResponseAssertContainsIT method assertJsonCrumbsEmptyContain.
@Test(groups = { "integration", "service", "httpget", "response" }, description = "An integration test to verify json data response")
public void assertJsonCrumbsEmptyContain() {
Map<String, Object> values = new HashMap<>();
values.put("id", 4);
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.get("posts/?id=4").assertContains().nestedKeyValues(new ArrayList<>(), values);
// verify no issues
finish();
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesResponseAssertContainsIT method assertJsonObjectDoesntContainMismatch.
@Test(groups = { "integration", "service", "httpget", "response" }, description = "An integration test to verify json data response", expectedExceptions = AssertionError.class)
public void assertJsonObjectDoesntContainMismatch() {
JsonObject json = new JsonObject();
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/?id=4").assertContains().value(json);
// verify 1 issue
finish(1);
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesResponseAssertContainsIT method assertJsonArrayDoesntContainMismatch.
@Test(groups = { "integration", "service", "httpget", "response" }, description = "An integration test to verify json data response", expectedExceptions = AssertionError.class)
public void assertJsonArrayDoesntContainMismatch() {
Map<String, Object> values = new HashMap<>();
values.put("id", 3);
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.get("posts/").assertContains().keyValues(values);
// verify 1 issue
finish(1);
}
Aggregations