Guest User

Untitled

a guest
Jul 22nd, 2019
52
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import io.restassured.http.ContentType;
  2. import io.restassured.response.Response;
  3. import net.serenitybdd.junit.runners.SerenityRunner;
  4. import net.serenitybdd.rest.SerenityRest;
  5.  
  6. static Response response;
  7.  
  8. public void createAI(){
  9.  
  10. response = SerenityRest.given().urlEncodingEnabled(false).contentType(ContentType.JSON)
  11. .auth().oauth2(authToken)
  12. .log().all()
  13. .when().body(JsonData)
  14. .post("/myAccount/category/AI/create")
  15. .then().extract().response();
  16.  
  17. System.out.println(response.asString());
  18. }
RAW Paste Data