Thibaut Bodart
01/25/2023, 9:23 AMarrayContaining
.
I need this logic for an array that is not defined as a value of an object property. Instead, the array is returned as the body of the response.
[
{....},
{....}
]
Ideally, I would need a newJsonArrayContaining
method in LambdaDsl
. See an example below.
return logAndReturn(builder.given("multiple connections exists")
.uponReceiving("request to get all connections")
.method("GET")
.path("/connections")
.headers(headers())
.willRespondWith()
.status(200)
.headers(headers())
.body(newJsonArrayContaining(arr -> {
......
});
}).build()));
As I understand it, there is currently no way to use arrayContaining
in this situation. Is my understanding correct?