You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
List<String> list = Arrays.asList("a", "b", "c");
String[] cd = {"c", "d"};
assertThat("Should not contain each item", list, not(hasItems(cd)));
This assertion won't fail. I understand why it will pass, though it's not expected by most of users.
It would be nice to have simple Matcher to check that "every item is not in the list"
# Now it's possible to use:
assertThat("Should not contain each item", list, everyItem(not(isIn(cd))));
# But that looks much better:
assertThat("Should not contain each item", list, doesNotContainAnyOf(cd));
The text was updated successfully, but these errors were encountered:
Case:
This assertion won't fail. I understand why it will pass, though it's not expected by most of users.
It would be nice to have simple Matcher to check that "every item is not in the list"
The text was updated successfully, but these errors were encountered: