We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the line assertThat(Arrays.asList(1,1), org.hamcrest.Matchers.contains(1));
fail.
The text was updated successfully, but these errors were encountered:
This is the intended behaviour. contains only matches if all parameters have a one-to-one correspondence to the list elements. So this would work:
contains
assertThat(Arrays.asList(1,1), org.hamcrest.Matchers.contains(1, 1));
To check if the list has at least one element use
assertThat(Arrays.asList(1,1), org.hamcrest.Matchers.hasItem(1));
Sorry, something went wrong.
#140 ;)
No branches or pull requests
the line
assertThat(Arrays.asList(1,1), org.hamcrest.Matchers.contains(1));
fail.
The text was updated successfully, but these errors were encountered: