Using the hamcrest library for Java, what's a nicely readable way to do the opposite of:
assertThat(someCollection, hasItem(someItem))
I want to make sure someCollection
does not contain item someItem
Using the hamcrest library for Java, what's a nicely readable way to do the opposite of:
assertThat(someCollection, hasItem(someItem))
I want to make sure someCollection
does not contain item someItem
Negate the hasItem
assertion
assertThat(someCollection, not(hasItem(someItem)))
or you can do;
.extract().jsonPath().getObject("data", pojo.class);
(above is response)
assertThat(response, not(hasItem(bodyYouArePosting)));