use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class ServicesIT method verifySuccessfulPostCallMultipartDataWithFile.
@Test(groups = { "integration", "service", "httppost", "response" }, description = "An integration test to verify a successful post call with parameters")
public void verifySuccessfulPostCallMultipartDataWithFile() {
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
call.post("post/4", new Request().setMultipartData(new HashMap<>()), new File("Jenkinsfile")).verifyEquals().objectData(simJson4);
// verify no issues
finish();
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class OutputFileTest method outputRequestPropertiesBothTest.
@Test
public void outputRequestPropertiesBothTest() {
Map<String, String> map = new HashMap<>();
map.put("hello", "world");
Request request = new Request(map);
JsonObject json = new JsonObject();
json.addProperty("hello", "world");
request.setData(json);
Assert.assertEquals(outputFile.outputRequestProperties(request), "<br/> with parameters: <div><i>{<br/> \"hello\": \"world\"<br/>}<div>hello : world</div></i></div>");
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class OutputFileTest method outputRequestPropertiesDataTest.
@Test
public void outputRequestPropertiesDataTest() {
JsonObject json = new JsonObject();
json.addProperty("hello", "world");
Request request = new Request(json);
Assert.assertEquals(outputFile.outputRequestProperties(request), "<br/> with parameters: <div><i>{<br/> \"hello\": \"world\"<br/>}</i></div>");
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class OutputFileTest method outputRequestPropertiesEmptyParamsTest.
@Test
public void outputRequestPropertiesEmptyParamsTest() {
Request request = new Request(new HashMap<>());
Assert.assertEquals(outputFile.outputRequestProperties(request), "<br/> with parameters: <div><i></i></div>");
}
use of com.coveros.selenified.services.Request in project selenified by Coveros.
the class RequestTest method checkJsonRequestTest.
@Test
public void checkJsonRequestTest() {
JsonObject json = new JsonObject();
Request request = new Request(json);
Assert.assertEquals(request.getData(), json);
}
Aggregations