For example, I have JSON in response:
[{"id":1,"name":"text"},{"id":2,"name":"text"}]}
I want to verify if a response contains a custom object. For example:
Person(id=1, name=text)
I found solution:
Person[] persons = response.as(Person[].class);
assertThat(person, IsArrayContaining.hasItemInArray(expectedPerson));
I want to have something like this:
response.then().assertThat().body(IsArrayContaining.hasItemInArray(object));
Is there any solution for this?
Thanks in advance for your help!