Skip to content

gkonst/hamcrest-extras

Repository files navigation

hamcrest-extras

Custom Hamcrest matchers for guava, beans, etc.

Build StatusCoverage Status

Usage

The static factory methods for all matchers are generated to com.github.gkonst.hamcrest.matchers.Matchers class for easy access.

Contents

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

About

Custom Hamcrest matchers for guava, beans, etc.

Resources

License

Stars

Watchers

Forks

Packages

No packages published