I'm getting trough initial very first blind steps of rest-assured with Java.
I have few requests, which actually works well and I started to add assertions. So I'm sending request, getting JSON as response, extracting it. And I need to verify if part of it equals to "success".
I'm taking it as
Response res = given().
when().post("/profile").then().contentType(ContentType.JSON).extract().response();
rc3 = res.path("op_list.msg").toString();
System.out.println(rc3);
So output looks like array according to toString
method's documentation. Surely, assertion won't work :( it sees difference between
[success]
and
success
Substrings is not recommended by internal code requirements. I just thought I'm using wrong method, but didn't find any besides asString
, but it won't work with path expression.
I have no any clue or relative search results. If you would help me with advice I'd be grateful.