All Classes and Interfaces
Class
Description
Calculates the logical conjunction of multiple matchers.
Calculates the logical disjunction of multiple matchers.
A matcher for arrays that matches when each item in the examined array satisfies the
corresponding matcher in the specified list of matchers.
Collected helper code for converting matchers between lists and iterables.
A
Description
that is stored as a string.BaseClass for all Matcher implementations.
A matcher that checks a
BigDecimal
is close to an expected value.A Matcher that checks the length of a string.
Allows matchers of the same type to be combined using
either
/or
, or
both
/and
.Allows syntactic sugar of using
both
and and
.Allows syntactic sugar of using
either
and or
.Builder for matchers that allow matchers to use a corresponding Compartor
A Condition implements part of a multi-step match.
Represents a single step in a multi-step sequence
Builder methods for various matchers.
Utility class for writing one off matchers.
Utility class for writing one off matchers (with type safety and null checks).
Provides a custom description to another matcher.
A description of a Matcher.
A description that consumes input but does nothing.
Convenient base class for Matchers of a specific type and that will report why the
received value has been rejected.
A matcher that applies a delegate matcher to every item in an
Iterable
.Supporting class for matching a feature of an object.
Matchers for properties of files.
Checks the status of a
File
.A matcher that checks if an object as equal fields values to an expected object.
Matches if an array contains an item satisfying a nested matcher.
A matcher that checks if an object has a JavaBean property with the
specified name.
A matcher that checks if an object has a JavaBean property with the
specified name and an expected value.
A Matcher that checks the output of the
toString()
method.Applies a Matcher to a given XML Node in an existing XML Node tree, specified by an XPath expression.
Decorates another Matcher, retaining the behaviour but allowing tests
to be slightly more expressive.
A matcher that always returns
true
.Matcher for array whose elements satisfy a sequence of matchers.
Deprecated.
Deprecated.
As of release 2.1, replaced by
ArrayMatching
.Matches if array size satisfies a size matcher.
Matches blank Strings (and null).
Is the value a number equal to a value within some range of acceptable error?
Deprecated.
As of release 2.1, replaced by
IsIterableContaining
.Matches if collection size satisfies a nested matcher.
A matcher of
Class
that matches when the specified baseType is assignable from the examined class.Tests if a collection is empty.
Tests if an iterable is empty.
Matches empty Strings (and null).
Is the value equal to another value, as tested by the
Object.equals(java.lang.Object)
method.Tests if a string is equal to another string, compressing any changes in whitespace.
Tests if a string is equal to another string, regardless of the case.
Tests if the value is an event announced by a specific object.
Tests if a collection contains a matching object.
Tests whether the value is an instance of a class.
Tests if an iterable contains matching elements.
Tests if an iterable contains matching elements in any order.
Tests if an iterable contains matching elements in order.
Tests if an iterable contains matching elements in relative order.
Matches if iterable size satisfies a size matcher.
Matches if map keys, values or entries match the value matchers.
Matches if map size satisfies a nested matcher.
Is the value a number actually not a number (NaN)?
Calculates the logical negation of a matcher.
Is the value null?
Is the value the same object as another value?
A matcher over acceptable values.
The Hamcrest entrypoint, static methods to check if matchers match a
given value.
Builder methods for various matchers.
Tests if a string matches a regular expression.
Static methods for building ordering comparisons.
Utility class with static methods for accessing properties on JavaBean objects.
A matcher that checks if a given bean has the same property values
as an example bean.
The ability of an object to describe itself.
Tests if the argument is a string that contains a specific substring.
Tests if a string contains the given substrings in order.
A
Description
that is stored as a string.Tests if the argument is a string that ends with a specific substring.
A matcher that checks a string against a regular expression.
Tests if the argument is a string that starts with a specific substring.
Common behaviour for matchers that check substrings.
Convenient base class for Matchers that require a non-null value of a specific type
and that will report why the received value has been rejected.
Convenient base class for Matchers that require a non-null value of a specific type.
ArrayMatching
.