Package | Description |
---|---|
org.hamcrest | |
org.hamcrest.beans |
Matchers of Java Bean properties and their values.
|
org.hamcrest.collection |
Matchers of arrays and collections.
|
org.hamcrest.core |
Fundamental matchers of objects and values, and composite matchers.
|
org.hamcrest.number |
Matchers that perform numeric comparisons.
|
org.hamcrest.object |
Matchers that inspect objects and classes.
|
org.hamcrest.text |
Matchers that perform text comparisons.
|
Modifier and Type | Class and Description |
---|---|
class |
CustomTypeSafeMatcher<T>
Utility class for writing one off matchers.
|
Modifier and Type | Class and Description |
---|---|
class |
HasProperty<T>
A Matcher that checks that an object has a JavaBean property
with the specified name.
|
Modifier and Type | Class and Description |
---|---|
class |
ArrayAsIterableMatcher<E> |
class |
HasItemInArray<T>
Matches if an array contains an item satisfying a nested matcher.
|
class |
IsArray<T>
Matcher for array whose elements satisfy a sequence of matchers.
|
class |
IsArrayContainingInAnyOrder<E>
Deprecated.
As of release 2.1, replaced by
ArrayMatching . |
class |
IsArrayContainingInOrder<E>
Deprecated.
As of release 2.1, replaced by
ArrayMatching . |
class |
IsEmptyCollection<E>
Tests if collection is empty.
|
class |
IsEmptyIterable<E>
Tests if collection is empty.
|
class |
IsMapContaining<K,V> |
Modifier and Type | Class and Description |
---|---|
class |
StringContains
Tests if the argument is a string that contains a specific substring.
|
class |
StringEndsWith
Tests if the argument is a string that ends with a specific substring.
|
class |
StringStartsWith
Tests if the argument is a string that starts with a specific substring.
|
class |
SubstringMatcher |
Modifier and Type | Class and Description |
---|---|
class |
BigDecimalCloseTo |
class |
IsCloseTo
Is the value a number equal to a value within some range of
acceptable error?
|
class |
IsNaN
Is the value a number actually not a number (NaN)?
|
Modifier and Type | Class and Description |
---|---|
class |
IsCompatibleType<T> |
Modifier and Type | Class and Description |
---|---|
class |
IsBlankString
Matches blank Strings (and null).
|
class |
IsEmptyString
Matches empty Strings (and null).
|
class |
IsEqualCompressingWhiteSpace
Tests if a string is equal to another string, compressing any changes in whitespace.
|
class |
IsEqualIgnoringCase
Tests if a string is equal to another string, regardless of the case.
|
class |
MatchesPattern |
class |
StringContainsInOrder |