Skip to content
New issue

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

Hamcrest-all 1.3 with JUnit 4.11 throws exception #872

Closed
apreg opened this issue Apr 9, 2014 · 4 comments
Closed

Hamcrest-all 1.3 with JUnit 4.11 throws exception #872

apreg opened this issue Apr 9, 2014 · 4 comments
Labels

Comments

@apreg
Copy link

apreg commented Apr 9, 2014

Hi,

In the ExpectedException class there is this import:
import static org.hamcrest.CoreMatchers.containsString;
which cannot be resolved if you use hamcrest-all simply because the containsString method is in org.hamcrest.Matchers.

@apreg apreg closed this as completed Apr 9, 2014
@apreg apreg reopened this Apr 9, 2014
@apreg
Copy link
Author

apreg commented Apr 9, 2014

Ah, false report. It turned out the mockito-all 1.9.5 has hamcrest integrated in which caused the problem. Sorry.

@vlio20
Copy link

vlio20 commented Feb 6, 2018

@apreg , how did you solve this issue?

@apreg
Copy link
Author

apreg commented Feb 6, 2018

sorry, I cannot remember

@stefanbirkner
Copy link
Contributor

You should always avoid to use hamcrest-all together with JUnit because hamcrest-all contains classes of hamcrest-core. Please use hamcrest-library if you need more than the core matchers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants