use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class ServicesResponseIT method verifyJsonObjectDataCheckGetCall.
@Test(groups = { "integration", "service", "httpget", "response" }, description = "An integration test to verify json object response for data check")
public void verifyJsonObjectDataCheckGetCall() {
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
Map<String, Object> params = new HashMap<>();
params.put("id", 4);
assertTrue(call.get("posts/", new Request().setUrlParams(params)).isData());
// verify no issues
finish();
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class ServicesOverrideIT method addHeaderDataTest.
@Test(groups = { "integration", "service", "headers" }, description = "An integration test to verify we can successfully set header values")
public void addHeaderDataTest() {
// use this object to verify the app looks as expected
Call call = this.calls.get();
// set some custom headers
Map<String, Object> headers = new HashMap<>();
headers.put("X-Atlassian-Token", "no-check");
call.addHeaders(headers);
// perform some actions - this will fail as application/xml isn't supported
call.post("posts/", new Request().setJsonPayload(new JsonObject())).verifyEquals().code(201);
// verify one issue
finish(1);
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class RequestTest method checkJsonDataRequestTest.
@Test
public void checkJsonDataRequestTest() {
JsonObject json = new JsonObject();
assertEquals(new Request().setJsonPayload(json).getJsonPayload(), json);
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class RequestTest method checkJsonObjectIsDataTest.
@Test
public void checkJsonObjectIsDataTest() {
JsonObject json = new JsonObject();
assertTrue(new Request().setJsonPayload(json).isPayload());
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class RequestTest method checkJsonDataDataRequestTest.
@Test
public void checkJsonDataDataRequestTest() {
JsonObject json = new JsonObject();
json.addProperty("name", "john");
assertEquals(new Request().setJsonPayload(json).getJsonPayload(), json);
}
Aggregations