Package org.hamcrest.core
package org.hamcrest.core
Fundamental matchers of objects and values, and composite matchers.
-
ClassesClassDescriptionAllOf<T>Calculates the logical conjunction of multiple matchers.AnyOf<T>Calculates the logical disjunction of multiple matchers.Allows matchers of the same type to be combined using
either
/or
, orboth
/and
.Allows syntactic sugar of usingboth
andand
.Allows syntactic sugar of usingeither
andor
.DescribedAs<T>Provides a custom description to another matcher.Every<T>A matcher that applies a delegate matcher to every item in anIterable
.Is<T>Decorates another Matcher, retaining the behaviour but allowing tests to be slightly more expressive.IsAnything<T>A matcher that always returnstrue
.Deprecated.IsEqual<T>Is the value equal to another value, as tested by theObject.equals(java.lang.Object)
method.Tests whether the value is an instance of a class.Tests if an iterable contains matching elements.IsNot<T>Calculates the logical negation of a matcher.IsNull<T>Is the value null?IsSame<T>Is the value the same object as another value?Tests if the argument is a string that contains a specific substring.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.
IsIterableContaining
.