Custom Hamcrest matchers for guava, beans, etc.
The static factory methods for all matchers are generated to com.github.gkonst.hamcrest.matchers.Matchers
class for easy access.
The package contains the following matchers:
- Guava
IsOptional
matchers
isAbsent()
- matches that the target Optional is not present.isPresent()
- matches that the target Optional is present.isValue(T value)
- matches that the target Optional is Some and contains value equals given value.isValue(Matcher<T> matcher)
- matches that the target Optional is Some and contains value matches given matcher.
- Bean
TheSameIs
matcher
theSameIs
- matches that the target bean has the same field values
- IO matchers
anExistingUrl
- matches that the target url exists