-
Notifications
You must be signed in to change notification settings - Fork 66
Assertions
Igor Gursky edited this page Sep 26, 2016
·
3 revisions
.....
Then status code is 200
And response contains property "id" with value other than "2000"
And response contains property "name" with value "Nexus 9"
And response contains property "owner.name" with value "Ned"
And response contains property "owner.surname" with value "Flanders"
And response contains property "owner.age" with value "43"
And response contains property "createdDate" of type "long"
And response does not contain property "updatedDate"
.....
Then status code is 200
And response contains an array "devices" of size "5"
.....
Then response contains property "devices.find{devices->device.id=="12345"}.type" with value "PHONE"
When the client performs GET request on /gadgets/12345
Then response contains properties from file gadgets/responses/createdGadget.json
In the mentioned example, Gadget with ID 12345 is returned in the response and all properties from createdGadget.json are searched in response body, values are asserted to be equal.