Search in sources :

Example 81 with Call

use of com.coveros.selenified.services.Call in project selenified by Coveros.

the class ServicesIT method verifySuccessfulPutCallJsonArrayData.

@Test(groups = { "integration", "service", "httpput", "response" }, description = "An integration test to verify a successful put call with parameters")
public void verifySuccessfulPutCallJsonArrayData() {
    // use this object to verify the app looks as expected
    Call call = this.calls.get();
    // perform some actions
    call.put("post/4", new Request().setJsonPayload(new JsonArray())).verifyEquals().message("");
    // verify no issues
    finish();
}
Also used : JsonArray(com.google.gson.JsonArray) Call(com.coveros.selenified.services.Call) Request(com.coveros.selenified.services.Request) Test(org.testng.annotations.Test)

Example 82 with Call

use of com.coveros.selenified.services.Call in project selenified by Coveros.

the class ServicesIT method verifySuccessfulDeleteCall.

// for delete calls
@Test(groups = { "integration", "service", "httpdelete", "response" }, description = "An integration test to verify a successful delete call with parameters")
public void verifySuccessfulDeleteCall() {
    // use this object to verify the app looks as expected
    Call call = this.calls.get();
    // perform some actions
    call.delete("post/4", new Request()).verifyEquals().code(200);
    // verify no issues
    finish();
}
Also used : Call(com.coveros.selenified.services.Call) Request(com.coveros.selenified.services.Request) Test(org.testng.annotations.Test)

Example 83 with Call

use of com.coveros.selenified.services.Call in project selenified by Coveros.

the class ServicesIT method verifySuccessfulPatchCallNoDataWithFile.

@Test(groups = { "integration", "service", "httppatch", "response" }, description = "An integration test to verify a successful patch call with parameters")
public void verifySuccessfulPatchCallNoDataWithFile() {
    // use this object to verify the app looks as expected
    Call call = this.calls.get();
    // perform some actions
    call.patch("post/4", new Request(), new File("Jenkinsfile")).verifyEquals().message("");
    // verify no issues
    finish();
}
Also used : Call(com.coveros.selenified.services.Call) Request(com.coveros.selenified.services.Request) File(java.io.File) Test(org.testng.annotations.Test)

Example 84 with Call

use of com.coveros.selenified.services.Call in project selenified by Coveros.

the class ServicesIT method verifySuccessfulPostCallUrlParamsData.

@Test(groups = { "integration", "service", "httppost", "response" }, description = "An integration test to verify a successful post call with parameters")
public void verifySuccessfulPostCallUrlParamsData() {
    // use this object to verify the app looks as expected
    Call call = this.calls.get();
    // perform some actions
    call.post("post/4", new Request().setUrlParams(new HashMap<>())).verifyEquals().objectData(simJson4);
    // verify no issues
    finish();
}
Also used : Call(com.coveros.selenified.services.Call) HashMap(java.util.HashMap) Request(com.coveros.selenified.services.Request) Test(org.testng.annotations.Test)

Example 85 with Call

use of com.coveros.selenified.services.Call in project selenified by Coveros.

the class ServicesIT method verifySuccessfulPostCall.

// for post calls
@Test(groups = { "integration", "service", "httppost", "response" }, description = "An integration test to verify a successful post call with parameters")
public void verifySuccessfulPostCall() {
    // use this object to verify the app looks as expected
    Call call = this.calls.get();
    // perform some actions
    call.post("post/4", new Request()).verifyEquals().code(200);
    // verify no issues
    finish();
}
Also used : Call(com.coveros.selenified.services.Call) Request(com.coveros.selenified.services.Request) Test(org.testng.annotations.Test)

Aggregations

Call (com.coveros.selenified.services.Call)377 Test (org.testng.annotations.Test)375 Request (com.coveros.selenified.services.Request)142 JsonObject (com.google.gson.JsonObject)139 HashMap (java.util.HashMap)94 Response (com.coveros.selenified.services.Response)40 JsonArray (com.google.gson.JsonArray)38 File (java.io.File)21 ArrayList (java.util.ArrayList)14 Hub (com.coveros.selenified.utilities.Hub)10 SessionId (org.openqa.selenium.remote.SessionId)10 HTTP (com.coveros.selenified.services.HTTP)3 App (com.coveros.selenified.application.App)2 JsonParser (com.google.gson.JsonParser)2 DesiredCapabilities (org.openqa.selenium.remote.DesiredCapabilities)2 InvalidBrowserException (com.coveros.selenified.exceptions.InvalidBrowserException)1 MalformedURLException (java.net.MalformedURLException)1