lundi 20 février 2017

Asserting REST response in StringReader format

I need to assert a response which is in the java.io.StringReader format. . I am able to get the correct response as {"isValid": false} when I use response.data. But when I try to assert this response using

response.data == '{"isValid": false}'

I get the below error.

Condition not satisfied:

response.data == '{"isValid": false}'
|        |    |
|        |    false
|            java.io.StringReader@35636217
groovyx.net.http.HttpResponseDecorator@5e4fa1da

How do I parse the StringReader format.

Aucun commentaire:

Enregistrer un commentaire