JavaHamcrest icon indicating copy to clipboard operation
JavaHamcrest copied to clipboard

Java (and original) version of Hamcrest

Results 146 JavaHamcrest issues
Sort by recently updated
recently updated
newest added

Some of the tests in OptionalMatchersTest fail when running on Windows because the expected strings use a hardcoded line separator (\n). They need to use System.lineSeparator() instead. It is a...

While not deprecated, the java.io.File class has been superceded by the java.nio.Path/java.nio.Files classes. I think more modern code would like to perform tests on Paths without having to convert them...

The `hasItem` matcher has the signature ```java Matcher

i have test case where the outcome returns empty set however I cannot use contains matcher as it throws following exception Caused by: java.lang.IllegalArgumentException: Should specify at least one expected...

## Problem Statement One of the biggest hassles when introducing Hamcrest to a team is the fact that the matchers are often field-by-field. That's hard to maintain as objects change,...

It's possible to call the `AnyOf` matcher with zero arguments or an empty iterable. In this case it should always be successful, in the current implementation however it's always unsuccessful.