static <T> Matcher<T> |
CoreMatchers.allOf(java.lang.Iterable<Matcher<? super T>> matchers) |
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<? super T>... matchers) |
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
|
static <T> Matcher<T> |
Matchers.allOf(java.lang.Iterable<Matcher<? super T>> matchers) |
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<? super T>... matchers) |
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<? super T> first,
Matcher<? super T> second) |
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<? super T> first,
Matcher<? super T> second,
Matcher<? super T> third) |
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<? super T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth) |
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<? super T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth) |
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<? super T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth) |
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
|
static <K,V> Matcher<java.util.Map<? extends K,? extends V>> |
Matchers.aMapWithSize(int size) |
Creates a matcher for Maps that matches when the size() method returns
a value equal to the specified size.
|
static <K,V> Matcher<java.util.Map<? extends K,? extends V>> |
Matchers.aMapWithSize(Matcher<? super java.lang.Integer> sizeMatcher) |
Creates a matcher for Maps that matches when the size() method returns
a value that satisfies the specified matcher.
|
static <K,V> Matcher<java.util.Map<? extends K,? extends V>> |
Matchers.anEmptyMap() |
Creates a matcher for Maps that matches when the size() method returns
zero.
|
static <T> Matcher<T> |
CoreMatchers.any(java.lang.Class<T> type) |
Creates a matcher that matches when the examined object is an instance of the specified type,
as determined by calling the Class.isInstance(Object) method on that type, passing the
the examined object.
|
static <T> Matcher<T> |
Matchers.any(java.lang.Class<T> type) |
Creates a matcher that matches when the examined object is an instance of the specified type,
as determined by calling the Class.isInstance(Object) method on that type, passing the
the examined object.
|
static Matcher<java.lang.Object> |
CoreMatchers.anything() |
Creates a matcher that always matches, regardless of the examined object.
|
static Matcher<java.lang.Object> |
CoreMatchers.anything(java.lang.String description) |
Creates a matcher that always matches, regardless of the examined object, but describes
itself with the specified String.
|
static Matcher<java.lang.Object> |
Matchers.anything() |
Creates a matcher that always matches, regardless of the examined object.
|
static Matcher<java.lang.Object> |
Matchers.anything(java.lang.String description) |
Creates a matcher that always matches, regardless of the examined object, but describes
itself with the specified String.
|
static <E> Matcher<E[]> |
Matchers.arrayContaining(E... items) |
Creates a matcher for arrays that matches when each item in the examined array is
logically equal to the corresponding item in the specified items.
|
static <E> Matcher<E[]> |
Matchers.arrayContaining(java.util.List<Matcher<? super E>> itemMatchers) |
Creates a matcher for arrays that matches when each item in the examined array satisfies the
corresponding matcher in the specified list of matchers.
|
static <E> Matcher<E[]> |
Matchers.arrayContaining(Matcher<? super E>... itemMatchers) |
Creates a matcher for arrays that matches when each item in the examined array satisfies the
corresponding matcher in the specified matchers.
|
static <E> Matcher<E[]> |
Matchers.arrayContainingInAnyOrder(E... items) |
Creates an order agnostic matcher for arrays that matches when each item in the
examined array is logically equal to one item anywhere in the specified items.
|
static <E> Matcher<E[]> |
Matchers.arrayContainingInAnyOrder(java.util.Collection<Matcher<? super E>> itemMatchers) |
Creates an order agnostic matcher for arrays that matches when each item in the
examined array satisfies one matcher anywhere in the specified collection of matchers.
|
static <E> Matcher<E[]> |
Matchers.arrayContainingInAnyOrder(Matcher<? super E>... itemMatchers) |
Creates an order agnostic matcher for arrays that matches when each item in the
examined array satisfies one matcher anywhere in the specified matchers.
|
static <E> Matcher<E[]> |
Matchers.arrayWithSize(int size) |
Creates a matcher for arrays that matches when the length of the array
equals the specified size.
|
static <E> Matcher<E[]> |
Matchers.arrayWithSize(Matcher<? super java.lang.Integer> sizeMatcher) |
Creates a matcher for arrays that matches when the length of the array
satisfies the specified matcher.
|
static Matcher<java.lang.String> |
Matchers.blankOrNullString() |
Creates a matcher of String that matches when the examined string is null, or
contains zero or more whitespace characters and nothing else.
|
static Matcher<java.lang.String> |
Matchers.blankString() |
Creates a matcher of String that matches when the examined string contains
zero or more whitespace characters and nothing else.
|
static Matcher<java.lang.Double> |
Matchers.closeTo(double operand,
double error) |
Creates a matcher of Doubles that matches when an examined double is equal
to the specified operand, within a range of +/- error.
|
static Matcher<java.math.BigDecimal> |
Matchers.closeTo(java.math.BigDecimal operand,
java.math.BigDecimal error) |
Creates a matcher of BigDecimals that matches when an examined BigDecimal is equal
to the specified operand, within a range of +/- error.
|
static <T extends java.lang.Comparable<T>> Matcher<T> |
Matchers.comparesEqualTo(T value) |
Creates a matcher of Comparable object that matches when the examined object is
equal to the specified value, as reported by the compareTo method of the
examined object.
|
static <E> Matcher<java.lang.Iterable<? extends E>> |
Matchers.contains(E... items) |
Creates a matcher for Iterables that matches when a single pass over the
examined Iterable yields a series of items, each logically equal to the
corresponding item in the specified items.
|
static <E> Matcher<java.lang.Iterable<? extends E>> |
Matchers.contains(java.util.List<Matcher<? super E>> itemMatchers) |
Creates a matcher for Iterables that matches when a single pass over the
examined Iterable yields a series of items, each satisfying the corresponding
matcher in the specified list of matchers.
|
static <E> Matcher<java.lang.Iterable<? extends E>> |
Matchers.contains(Matcher<? super E> itemMatcher) |
Creates a matcher for Iterables that matches when a single pass over the
examined Iterable yields a single item that satisfies the specified matcher.
|
static <E> Matcher<java.lang.Iterable<? extends E>> |
Matchers.contains(Matcher<? super E>... itemMatchers) |
Creates a matcher for Iterables that matches when a single pass over the
examined Iterable yields a series of items, each satisfying the corresponding
matcher in the specified matchers.
|
static <T> Matcher<java.lang.Iterable<? extends T>> |
Matchers.containsInAnyOrder(java.util.Collection<Matcher<? super T>> itemMatchers) |
Creates an order agnostic matcher for Iterables that matches when a single pass over
the examined Iterable yields a series of items, each satisfying one matcher anywhere
in the specified collection of matchers.
|
static <T> Matcher<java.lang.Iterable<? extends T>> |
Matchers.containsInAnyOrder(Matcher<? super T>... itemMatchers) |
Creates an order agnostic matcher for Iterables that matches when a single pass over
the examined Iterable yields a series of items, each satisfying one matcher anywhere
in the specified matchers.
|
static <T> Matcher<java.lang.Iterable<? extends T>> |
Matchers.containsInAnyOrder(T... items) |
Creates an order agnostic matcher for Iterables that matches when a single pass over
the examined Iterable yields a series of items, each logically equal to one item
anywhere in the specified items.
|
static <E> Matcher<java.lang.Iterable<? extends E>> |
Matchers.containsInRelativeOrder(E... items) |
Creates a matcher for Iterables that matches when a single pass over the
examined Iterable yields a series of items, that contains items logically equal to the
corresponding item in the specified items, in the same relative order
For example:
|
static <E> Matcher<java.lang.Iterable<? extends E>> |
Matchers.containsInRelativeOrder(java.util.List<Matcher<? super E>> itemMatchers) |
Creates a matcher for Iterables that matches when a single pass over the
examined Iterable yields a series of items, that contains items satisfying the corresponding
matcher in the specified list of matchers, in the same relative order.
|
static <E> Matcher<java.lang.Iterable<? extends E>> |
Matchers.containsInRelativeOrder(Matcher<? super E>... itemMatchers) |
Creates a matcher for Iterables that matches when a single pass over the
examined Iterable yields a series of items, that each satisfying the corresponding
matcher in the specified matchers, in the same relative order.
|
static Matcher<java.lang.String> |
CoreMatchers.containsString(java.lang.String substring) |
Creates a matcher that matches if the examined String contains the specified
String anywhere.
|
static Matcher<java.lang.String> |
Matchers.containsString(java.lang.String substring) |
Creates a matcher that matches if the examined String contains the specified
String anywhere.
|
static Matcher<java.lang.String> |
CoreMatchers.containsStringIgnoringCase(java.lang.String substring) |
Creates a matcher that matches if the examined String contains the specified
String anywhere, ignoring case.
|
static Matcher<java.lang.String> |
Matchers.containsStringIgnoringCase(java.lang.String substring) |
Creates a matcher that matches if the examined String contains the specified
String anywhere, ignoring case.
|
static <T> Matcher<T> |
CoreMatchers.describedAs(java.lang.String description,
Matcher<T> matcher,
java.lang.Object... values) |
Wraps an existing matcher, overriding its description with that specified.
|
static <T> Matcher<T> |
Matchers.describedAs(java.lang.String description,
Matcher<T> matcher,
java.lang.Object... values) |
Wraps an existing matcher, overriding its description with that specified.
|
static <E> Matcher<java.util.Collection<? extends E>> |
Matchers.empty() |
Creates a matcher for Collections matching examined collections whose isEmpty
method returns true.
|
static <E> Matcher<E[]> |
Matchers.emptyArray() |
Creates a matcher for arrays that matches when the length of the array
is zero.
|
static <E> Matcher<java.util.Collection<E>> |
Matchers.emptyCollectionOf(java.lang.Class<E> unusedToForceReturnType) |
Creates a matcher for Collections matching examined collections whose isEmpty
method returns true.
|
static <E> Matcher<java.lang.Iterable<? extends E>> |
Matchers.emptyIterable() |
Creates a matcher for Iterables matching examined iterables that yield no items.
|
static <E> Matcher<java.lang.Iterable<E>> |
Matchers.emptyIterableOf(java.lang.Class<E> unusedToForceReturnType) |
Creates a matcher for Iterables matching examined iterables that yield no items.
|
static Matcher<java.lang.String> |
Matchers.emptyOrNullString() |
Creates a matcher of String that matches when the examined string is null, or
has zero length.
|
static Matcher<java.lang.String> |
Matchers.emptyString() |
Creates a matcher of String that matches when the examined string has zero length.
|
static Matcher<java.lang.String> |
CoreMatchers.endsWith(java.lang.String suffix) |
Creates a matcher that matches if the examined String ends with the specified
String.
|
static Matcher<java.lang.String> |
Matchers.endsWith(java.lang.String suffix) |
Creates a matcher that matches if the examined String ends with the specified
String.
|
static Matcher<java.lang.String> |
CoreMatchers.endsWithIgnoringCase(java.lang.String suffix) |
Creates a matcher that matches if the examined String ends with the specified
String, ignoring case.
|
static Matcher<java.lang.String> |
Matchers.endsWithIgnoringCase(java.lang.String suffix) |
Creates a matcher that matches if the examined String ends with the specified
String, ignoring case.
|
static <T> Matcher<T> |
CoreMatchers.equalTo(T operand) |
Creates a matcher that matches when the examined object is logically equal to the specified
operand, as determined by calling the Object.equals(java.lang.Object) method on
the examined object.
|
static <T> Matcher<T> |
Matchers.equalTo(T operand) |
Creates a matcher that matches when the examined object is logically equal to the specified
operand, as determined by calling the Object.equals(java.lang.Object) method on
the examined object.
|
static Matcher<java.lang.String> |
Matchers.equalToCompressingWhiteSpace(java.lang.String expectedString) |
Creates a matcher of String that matches when the examined string is equal to
the specified expectedString, when whitespace differences are (mostly) ignored.
|
static Matcher<java.lang.String> |
Matchers.equalToIgnoringCase(java.lang.String expectedString) |
Creates a matcher of String that matches when the examined string is equal to
the specified expectedString, ignoring case.
|
static Matcher<java.lang.String> |
Matchers.equalToIgnoringWhiteSpace(java.lang.String expectedString) |
Deprecated.
|
static Matcher<java.lang.Object> |
CoreMatchers.equalToObject(java.lang.Object operand) |
Creates an IsEqual matcher that does not enforce the values being
compared to be of the same static type.
|
static Matcher<java.lang.Object> |
Matchers.equalToObject(java.lang.Object operand) |
Creates an IsEqual matcher that does not enforce the values being
compared to be of the same static type.
|
static Matcher<java.util.EventObject> |
Matchers.eventFrom(java.lang.Class<? extends java.util.EventObject> eventClass,
java.lang.Object source) |
Creates a matcher of EventObject that matches any object
derived from eventClass announced by source.
|
static Matcher<java.util.EventObject> |
Matchers.eventFrom(java.lang.Object source) |
Creates a matcher of EventObject that matches any EventObject
announced by source.
|
static <U> Matcher<java.lang.Iterable<? extends U>> |
CoreMatchers.everyItem(Matcher<U> itemMatcher) |
Creates a matcher for Iterables that only matches when a single pass over the
examined Iterable yields items that are all matched by the specified
itemMatcher.
|
static <U> Matcher<java.lang.Iterable<? extends U>> |
Matchers.everyItem(Matcher<U> itemMatcher) |
Creates a matcher for Iterables that only matches when a single pass over the
examined Iterable yields items that are all matched by the specified
itemMatcher.
|
static <T extends java.lang.Comparable<T>> Matcher<T> |
Matchers.greaterThan(T value) |
Creates a matcher of Comparable object that matches when the examined object is
greater than the specified value, as reported by the compareTo method of the
examined object.
|
static <T extends java.lang.Comparable<T>> Matcher<T> |
Matchers.greaterThanOrEqualTo(T value) |
Creates a matcher of Comparable object that matches when the examined object is
greater than or equal to the specified value, as reported by the compareTo method
of the examined object.
|
static <K,V> Matcher<java.util.Map<? extends K,? extends V>> |
Matchers.hasEntry(K key,
V value) |
Creates a matcher for Maps matching when the examined Map contains
at least one entry whose key equals the specified key and whose value equals the
specified value.
|
static <K,V> Matcher<java.util.Map<? extends K,? extends V>> |
Matchers.hasEntry(Matcher<? super K> keyMatcher,
Matcher<? super V> valueMatcher) |
Creates a matcher for Maps matching when the examined Map contains
at least one entry whose key satisfies the specified keyMatcher and whose
value satisfies the specified valueMatcher.
|
static <T> Matcher<java.lang.Iterable<? super T>> |
CoreMatchers.hasItem(Matcher<? super T> itemMatcher) |
Creates a matcher for Iterables that only matches when a single pass over the
examined Iterable yields at least one item that is matched by the specified
itemMatcher.
|
static <T> Matcher<java.lang.Iterable<? super T>> |
CoreMatchers.hasItem(T item) |
Creates a matcher for Iterables that only matches when a single pass over the
examined Iterable yields at least one item that is equal to the specified
item.
|
static <T> Matcher<java.lang.Iterable<? super T>> |
Matchers.hasItem(Matcher<? super T> itemMatcher) |
Creates a matcher for Iterables that only matches when a single pass over the
examined Iterable yields at least one item that is matched by the specified
itemMatcher.
|
static <T> Matcher<java.lang.Iterable<? super T>> |
Matchers.hasItem(T item) |
Creates a matcher for Iterables that only matches when a single pass over the
examined Iterable yields at least one item that is equal to the specified
item.
|
static <T> Matcher<T[]> |
Matchers.hasItemInArray(Matcher<? super T> elementMatcher) |
Creates a matcher for arrays that matches when the examined array contains at least one item
that is matched by the specified elementMatcher.
|
static <T> Matcher<T[]> |
Matchers.hasItemInArray(T element) |
A shortcut to the frequently used hasItemInArray(equalTo(x)).
|
static <T> Matcher<java.lang.Iterable<T>> |
CoreMatchers.hasItems(Matcher<? super T>... itemMatchers) |
Creates a matcher for Iterables that matches when consecutive passes over the
examined Iterable yield at least one item that is matched by the corresponding
matcher from the specified itemMatchers.
|
static <T> Matcher<java.lang.Iterable<T>> |
CoreMatchers.hasItems(T... items) |
Creates a matcher for Iterables that matches when consecutive passes over the
examined Iterable yield at least one item that is equal to the corresponding
item from the specified items.
|
static <T> Matcher<java.lang.Iterable<T>> |
Matchers.hasItems(Matcher<? super T>... itemMatchers) |
Creates a matcher for Iterables that matches when consecutive passes over the
examined Iterable yield at least one item that is matched by the corresponding
matcher from the specified itemMatchers.
|
static <T> Matcher<java.lang.Iterable<T>> |
Matchers.hasItems(T... items) |
Creates a matcher for Iterables that matches when consecutive passes over the
examined Iterable yield at least one item that is equal to the corresponding
item from the specified items.
|
static <K> Matcher<java.util.Map<? extends K,?>> |
Matchers.hasKey(K key) |
Creates a matcher for Maps matching when the examined Map contains
at least one key that is equal to the specified key.
|
static <K> Matcher<java.util.Map<? extends K,?>> |
Matchers.hasKey(Matcher<? super K> keyMatcher) |
Creates a matcher for Maps matching when the examined Map contains
at least one key that satisfies the specified matcher.
|
static Matcher<java.lang.CharSequence> |
Matchers.hasLength(int length) |
Creates a matcher of CharSequence that matches when a char sequence has the length
of the specified argument.
|
static <T> Matcher<T> |
Matchers.hasProperty(java.lang.String propertyName) |
Creates a matcher that matches when the examined object has a JavaBean property
with the specified name.
|
static <T> Matcher<T> |
Matchers.hasProperty(java.lang.String propertyName,
Matcher<?> valueMatcher) |
Creates a matcher that matches when the examined object has a JavaBean property
with the specified name whose value satisfies the specified matcher.
|
static <E> Matcher<java.util.Collection<? extends E>> |
Matchers.hasSize(int size) |
Creates a matcher for Collections that matches when the size() method returns
a value equal to the specified size.
|
static <E> Matcher<java.util.Collection<? extends E>> |
Matchers.hasSize(Matcher<? super java.lang.Integer> sizeMatcher) |
Creates a matcher for Collections that matches when the size() method returns
a value that satisfies the specified matcher.
|
static <T> Matcher<T> |
Matchers.hasToString(java.lang.String expectedToString) |
Creates a matcher that matches any examined object whose toString method
returns a value equalTo the specified string.
|
static <T> Matcher<T> |
Matchers.hasToString(Matcher<? super java.lang.String> toStringMatcher) |
Creates a matcher that matches any examined object whose toString method
returns a value that satisfies the specified matcher.
|
static <V> Matcher<java.util.Map<?,? extends V>> |
Matchers.hasValue(Matcher<? super V> valueMatcher) |
Creates a matcher for Maps matching when the examined Map contains
at least one value that satisfies the specified valueMatcher.
|
static <V> Matcher<java.util.Map<?,? extends V>> |
Matchers.hasValue(V value) |
Creates a matcher for Maps matching when the examined Map contains
at least one value that is equal to the specified value.
|
static Matcher<org.w3c.dom.Node> |
Matchers.hasXPath(java.lang.String xPath) |
Creates a matcher of Nodes that matches when the examined node contains a node
at the specified xPath, with any content.
|
static Matcher<org.w3c.dom.Node> |
Matchers.hasXPath(java.lang.String xPath,
javax.xml.namespace.NamespaceContext namespaceContext) |
Creates a matcher of Nodes that matches when the examined node contains a node
at the specified xPath within the specified namespace context, with any content.
|
static Matcher<org.w3c.dom.Node> |
Matchers.hasXPath(java.lang.String xPath,
javax.xml.namespace.NamespaceContext namespaceContext,
Matcher<java.lang.String> valueMatcher) |
Creates a matcher of Nodes that matches when the examined node has a value at the
specified xPath, within the specified namespaceContext, that satisfies
the specified valueMatcher.
|
static Matcher<org.w3c.dom.Node> |
Matchers.hasXPath(java.lang.String xPath,
Matcher<java.lang.String> valueMatcher) |
Creates a matcher of Nodes that matches when the examined node has a value at the
specified xPath that satisfies the specified valueMatcher.
|
static <T> Matcher<T> |
Matchers.in(java.util.Collection<T> collection) |
Creates a matcher that matches when the examined object is found within the
specified collection.
|
static <T> Matcher<T> |
Matchers.in(T[] elements) |
Creates a matcher that matches when the examined object is found within the
specified array.
|
static <T> Matcher<T> |
CoreMatchers.instanceOf(java.lang.Class<?> type) |
Creates a matcher that matches when the examined object is an instance of the specified type,
as determined by calling the Class.isInstance(Object) method on that type, passing the
the examined object.
|
static <T> Matcher<T> |
Matchers.instanceOf(java.lang.Class<?> type) |
Creates a matcher that matches when the examined object is an instance of the specified type,
as determined by calling the Class.isInstance(Object) method on that type, passing the
the examined object.
|
static <T> Matcher<T> |
CoreMatchers.is(Matcher<T> matcher) |
Decorates another Matcher, retaining its behaviour, but allowing tests
to be slightly more expressive.
|
static <T> Matcher<T> |
CoreMatchers.is(T value) |
A shortcut to the frequently used is(equalTo(x)).
|
static <T> Matcher<T> |
Matchers.is(Matcher<T> matcher) |
Decorates another Matcher, retaining its behaviour, but allowing tests
to be slightly more expressive.
|
static <T> Matcher<T> |
Matchers.is(T value) |
A shortcut to the frequently used is(equalTo(x)).
|
static <T> Matcher<T> |
CoreMatchers.isA(java.lang.Class<T> type) |
A shortcut to the frequently used is(instanceOf(SomeClass.class)).
|
static <T> Matcher<T> |
Matchers.isA(java.lang.Class<?> type) |
A shortcut to the frequently used is(instanceOf(SomeClass.class)).
|
static Matcher<java.lang.String> |
Matchers.isEmptyOrNullString() |
Deprecated.
|
static Matcher<java.lang.String> |
Matchers.isEmptyString() |
Deprecated.
|
static <T> Matcher<T> |
Matchers.isIn(java.util.Collection<T> collection) |
Deprecated.
|
static <T> Matcher<T> |
Matchers.isIn(T[] elements) |
Deprecated.
|
static <T> Matcher<T> |
Matchers.isOneOf(T... elements) |
Deprecated.
|
static <E> Matcher<java.lang.Iterable<E>> |
Matchers.iterableWithSize(int size) |
Creates a matcher for Iterables that matches when a single pass over the
examined Iterable yields an item count that is equal to the specified
size argument.
|
static <E> Matcher<java.lang.Iterable<E>> |
Matchers.iterableWithSize(Matcher<? super java.lang.Integer> sizeMatcher) |
Creates a matcher for Iterables that matches when a single pass over the
examined Iterable yields an item count that satisfies the specified
matcher.
|
static <T extends java.lang.Comparable<T>> Matcher<T> |
Matchers.lessThan(T value) |
Creates a matcher of Comparable object that matches when the examined object is
less than the specified value, as reported by the compareTo method of the
examined object.
|
static <T extends java.lang.Comparable<T>> Matcher<T> |
Matchers.lessThanOrEqualTo(T value) |
Creates a matcher of Comparable object that matches when the examined object is
less than or equal to the specified value, as reported by the compareTo method
of the examined object.
|
static Matcher<java.lang.String> |
Matchers.matchesPattern(java.lang.String regex) |
Creates a matcher of String that matches when the examined string
exactly matches the given regular expression, treated as a Pattern.
|
static Matcher<java.lang.String> |
Matchers.matchesPattern(java.util.regex.Pattern pattern) |
Creates a matcher of String that matches when the examined string
exactly matches the given Pattern.
|
static Matcher<java.lang.String> |
Matchers.matchesRegex(java.lang.String regex) |
Validate a string with a regex.
|
static Matcher<java.lang.String> |
Matchers.matchesRegex(java.util.regex.Pattern pattern) |
Validate a string with a Pattern.
|
static <T> Matcher<T> |
CoreMatchers.not(Matcher<T> matcher) |
Creates a matcher that wraps an existing matcher, but inverts the logic by which
it will match.
|
static <T> Matcher<T> |
CoreMatchers.not(T value) |
A shortcut to the frequently used not(equalTo(x)).
|
static <T> Matcher<T> |
Matchers.not(Matcher<T> matcher) |
Creates a matcher that wraps an existing matcher, but inverts the logic by which
it will match.
|
static <T> Matcher<T> |
Matchers.not(T value) |
A shortcut to the frequently used not(equalTo(x)).
|
static Matcher<java.lang.Double> |
Matchers.notANumber() |
Creates a matcher of Doubles that matches when an examined double is not a number.
|
static Matcher<java.lang.Object> |
CoreMatchers.notNullValue() |
A shortcut to the frequently used not(nullValue()).
|
static <T> Matcher<T> |
CoreMatchers.notNullValue(java.lang.Class<T> type) |
A shortcut to the frequently used not(nullValue(X.class)).
|
static Matcher<java.lang.Object> |
Matchers.notNullValue() |
A shortcut to the frequently used not(nullValue()).
|
static <T> Matcher<T> |
Matchers.notNullValue(java.lang.Class<T> type) |
A shortcut to the frequently used not(nullValue(X.class)).
|
static Matcher<java.lang.Object> |
CoreMatchers.nullValue() |
Creates a matcher that matches if examined object is null.
|
static <T> Matcher<T> |
CoreMatchers.nullValue(java.lang.Class<T> type) |
Creates a matcher that matches if examined object is null.
|
static Matcher<java.lang.Object> |
Matchers.nullValue() |
Creates a matcher that matches if examined object is null.
|
static <T> Matcher<T> |
Matchers.nullValue(java.lang.Class<T> type) |
Creates a matcher that matches if examined object is null.
|
static <T> Matcher<T> |
Matchers.oneOf(T... elements) |
Creates a matcher that matches when the examined object is equal to one of the
specified elements.
|
static <T> Matcher<T> |
CoreMatchers.sameInstance(T target) |
Creates a matcher that matches only when the examined object is the same instance as
the specified target object.
|
static <T> Matcher<T> |
Matchers.sameInstance(T target) |
Creates a matcher that matches only when the examined object is the same instance as
the specified target object.
|
static <B> Matcher<B> |
Matchers.samePropertyValuesAs(B expectedBean,
java.lang.String... ignoredProperties) |
Creates a matcher that matches when the examined object has values for all of
its JavaBean properties that are equal to the corresponding values of the
specified bean.
|
static Matcher<java.lang.String> |
CoreMatchers.startsWith(java.lang.String prefix) |
Creates a matcher that matches if the examined String starts with the specified
String.
|
static Matcher<java.lang.String> |
Matchers.startsWith(java.lang.String prefix) |
Creates a matcher that matches if the examined String starts with the specified
String.
|
static Matcher<java.lang.String> |
CoreMatchers.startsWithIgnoringCase(java.lang.String prefix) |
Creates a matcher that matches if the examined String starts with the specified
String, ignoring case
|
static Matcher<java.lang.String> |
Matchers.startsWithIgnoringCase(java.lang.String prefix) |
Creates a matcher that matches if the examined String starts with the specified
String, ignoring case
|
static Matcher<java.lang.String> |
Matchers.stringContainsInOrder(java.lang.Iterable<java.lang.String> substrings) |
Creates a matcher of String that matches when the examined string contains all of
the specified substrings, considering the order of their appearance.
|
static Matcher<java.lang.String> |
Matchers.stringContainsInOrder(java.lang.String... substrings) |
Creates a matcher of String that matches when the examined string contains all of
the specified substrings, considering the order of their appearance.
|
static <T> Matcher<T> |
CoreMatchers.theInstance(T target) |
Creates a matcher that matches only when the examined object is the same instance as
the specified target object.
|
static <T> Matcher<T> |
Matchers.theInstance(T target) |
Creates a matcher that matches only when the examined object is the same instance as
the specified target object.
|
static <T> Matcher<java.lang.Class<?>> |
Matchers.typeCompatibleWith(java.lang.Class<T> baseType) |
Creates a matcher of Class that matches when the specified baseType is
assignable from the examined class.
|