Package | Description |
---|---|
org.eclipse.epsilon.egl.engine.traceability.fine.test.matchers | |
org.eclipse.epsilon.test.util.hamcrest | |
org.hamcrest |
The stable API defining Matcher and its associated interfaces and classes.
|
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.
|
org.hamcrest.xml |
Matchers of XML documents.
|
org.mockito |
Mockito is a mock library for java - see Mockito class for for usage.
|
org.mockito.internal.invocation |
Invocation and related classes.
|
org.mockito.internal.matchers |
Argument matchers for verification and stubbing.
|
org.mockito.internal.matchers.apachecommons |
Argument matchers that use Apache Commons Lang reflection-equality.
|
org.mockito.internal.progress |
Mocking progress stateful classes.
|
org.mockito.internal.verification.argumentmatching |
Deals with matching arguments
|
Modifier and Type | Class and Description |
---|---|
class |
EmptyMapMatcher |
Modifier and Type | Class and Description |
---|---|
class |
EmptyCollection |
Modifier and Type | Method and Description |
---|---|
static Matcher<Collection<?>> |
EmptyCollection.empty() |
Modifier and Type | Class and Description |
---|---|
class |
BaseMatcher<T>
BaseClass for all Matcher implementations.
|
class |
CustomMatcher<T>
Utility class for writing one off matchers.
|
class |
CustomTypeSafeMatcher<T>
Utility class for writing one off matchers.
|
class |
DiagnosingMatcher<T>
TODO(ngd): Document.
|
class |
FeatureMatcher<T,U>
Supporting class for matching a feature of an object.
|
class |
TypeSafeDiagnosingMatcher<T>
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.
|
class |
TypeSafeMatcher<T>
Convenient base class for Matchers that require a non-null value of a specific type.
|
Modifier and Type | Method and Description |
---|---|
static <T> Matcher<T> |
Matchers.allOf(Iterable<Matcher<? super T>> matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Iterable<Matcher<? super T>> matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<? super T>... matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<? super T>... matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.any(Class<T> type)
Is the value an instance of a particular type?
Use this version to make generics conform, for example in
the JMock clause
with(any(Thing.class)) |
static <T> Matcher<T> |
CoreMatchers.any(Class<T> type)
Is the value an instance of a particular type?
Use this version to make generics conform, for example in
the JMock clause
with(any(Thing.class)) |
static <T> Matcher<T> |
Matchers.anything()
This matcher always evaluates to true.
|
static <T> Matcher<T> |
CoreMatchers.anything()
This matcher always evaluates to true.
|
static <T> Matcher<T> |
Matchers.anything(String description)
This matcher always evaluates to true.
|
static <T> Matcher<T> |
CoreMatchers.anything(String description)
This matcher always evaluates to true.
|
static <E> Matcher<E[]> |
Matchers.arrayContaining(E... items) |
static <E> Matcher<E[]> |
Matchers.arrayContaining(List<Matcher<? super E>> matchers) |
static <E> Matcher<E[]> |
Matchers.arrayContaining(Matcher<? super E>... matchers) |
static <E> Matcher<E[]> |
Matchers.arrayContainingInAnyOrder(Collection<Matcher<? super E>> matchers) |
static <E> Matcher<E[]> |
Matchers.arrayContainingInAnyOrder(E... items) |
static <E> Matcher<E[]> |
Matchers.arrayContainingInAnyOrder(Matcher<? super E>... matchers) |
static <E> Matcher<E[]> |
Matchers.arrayWithSize(int size)
This is a shortcut to the frequently used arrayWithSize(equalTo(x)).
|
static <E> Matcher<E[]> |
Matchers.arrayWithSize(Matcher<? super Integer> sizeMatcher)
Does array size satisfy a given matcher?
|
static Matcher<Double> |
Matchers.closeTo(double operand,
double error) |
static <T extends Comparable<T>> |
Matchers.comparesEqualTo(T value)
Is value = expected?
|
static <E> Matcher<Iterable<E>> |
Matchers.contains(E... items) |
static <E> Matcher<Iterable<E>> |
Matchers.contains(List<Matcher<? super E>> contents) |
static <E> Matcher<Iterable<E>> |
Matchers.contains(Matcher<? super E>... item) |
static <E> Matcher<Iterable<E>> |
Matchers.contains(Matcher<E> item) |
static <T> Matcher<Iterable<T>> |
Matchers.containsInAnyOrder(Collection<Matcher<? super T>> matchers) |
static <T> Matcher<Iterable<T>> |
Matchers.containsInAnyOrder(Matcher<? super T>... item) |
static <E> Matcher<Iterable<E>> |
Matchers.containsInAnyOrder(Matcher<E> item) |
static <T> Matcher<Iterable<T>> |
Matchers.containsInAnyOrder(T... items) |
static Matcher<String> |
Matchers.containsString(String substring) |
static Matcher<String> |
CoreMatchers.containsString(String substring) |
static <T> Matcher<T> |
Matchers.describedAs(String description,
Matcher<T> matcher,
Object... values)
Wraps an existing matcher and overrides the description when it fails.
|
static <T> Matcher<T> |
CoreMatchers.describedAs(String description,
Matcher<T> matcher,
Object... values)
Wraps an existing matcher and overrides the description when it fails.
|
static <E> Matcher<Collection<E>> |
Matchers.empty()
Matches an empty collection.
|
static <E> Matcher<E[]> |
Matchers.emptyArray()
Matches an empty array.
|
static <E> Matcher<Iterable<E>> |
Matchers.emptyIterable()
Matches an empty iterable.
|
static Matcher<String> |
Matchers.endsWith(String substring) |
static Matcher<String> |
CoreMatchers.endsWith(String substring) |
static <T> Matcher<? super T> |
Matchers.equalTo(T operand)
Is the value equal to another value, as tested by the
Object.equals(java.lang.Object) invokedMethod? |
static <T> Matcher<? super T> |
CoreMatchers.equalTo(T operand)
Is the value equal to another value, as tested by the
Object.equals(java.lang.Object) invokedMethod? |
static Matcher<String> |
Matchers.equalToIgnoringCase(String string) |
static Matcher<String> |
Matchers.equalToIgnoringWhiteSpace(String string) |
static Matcher<EventObject> |
Matchers.eventFrom(Class<? extends EventObject> eventClass,
Object source)
Constructs an IsEventFrom Matcher that returns true for any object
derived from eventClass announced by source.
|
static Matcher<EventObject> |
Matchers.eventFrom(Object source)
Constructs an IsEventFrom Matcher that returns true for any object
derived from
EventObject announced by source
. |
static <U> Matcher<Iterable<U>> |
Matchers.everyItem(Matcher<U> itemMatcher) |
static <U> Matcher<Iterable<U>> |
CoreMatchers.everyItem(Matcher<U> itemMatcher) |
static <T extends Comparable<T>> |
Matchers.greaterThan(T value)
Is value > expected?
|
static <T extends Comparable<T>> |
Matchers.greaterThanOrEqualTo(T value)
Is value >= expected?
|
static <K,V> Matcher<Map<? extends K,? extends V>> |
Matchers.hasEntry(K key,
V value) |
static <K,V> Matcher<Map<? extends K,? extends V>> |
Matchers.hasEntry(Matcher<? super K> keyMatcher,
Matcher<? super V> valueMatcher) |
static <T> Matcher<Iterable<? super T>> |
Matchers.hasItem(Matcher<? super T> elementMatcher) |
static <T> Matcher<Iterable<? super T>> |
CoreMatchers.hasItem(Matcher<? super T> elementMatcher) |
static <T> Matcher<Iterable<? super T>> |
Matchers.hasItem(T element) |
static <T> Matcher<Iterable<? super T>> |
CoreMatchers.hasItem(T element) |
static <T> Matcher<T[]> |
Matchers.hasItemInArray(Matcher<? super T> elementMatcher)
Evaluates to true if any item in an array satisfies the given matcher.
|
static <T> Matcher<T[]> |
Matchers.hasItemInArray(T element)
This is a shortcut to the frequently used hasItemInArray(equalTo(x)).
|
static <T> Matcher<Iterable<T>> |
Matchers.hasItems(Matcher<? super T>... elementMatchers) |
static <T> Matcher<Iterable<T>> |
CoreMatchers.hasItems(Matcher<? super T>... elementMatchers) |
static <T> Matcher<Iterable<T>> |
Matchers.hasItems(T... elements) |
static <T> Matcher<Iterable<T>> |
CoreMatchers.hasItems(T... elements) |
static <K> Matcher<Map<? super K,?>> |
Matchers.hasKey(K key) |
static <K> Matcher<Map<? super K,?>> |
Matchers.hasKey(Matcher<? super K> keyMatcher) |
static <T> Matcher<T> |
Matchers.hasProperty(String propertyName) |
static <T> Matcher<T> |
Matchers.hasProperty(String propertyName,
Matcher<?> value) |
static <E> Matcher<? super Collection<? extends E>> |
Matchers.hasSize(int size)
This is a shortcut to the frequently used hasSize(equalTo(x)).
|
static <E> Matcher<? super Collection<? extends E>> |
Matchers.hasSize(Matcher<? super Integer> size)
Does collection size satisfy a given matcher?
|
static <T> Matcher<T> |
Matchers.hasToString(Matcher<? super String> toStringMatcher)
Evaluates whether item.toString() satisfies a given matcher.
|
static <T> Matcher<T> |
Matchers.hasToString(String expectedToString)
This is a shortcut to the frequently used has_string(equalTo(x)).
|
static <V> Matcher<? super Map<?,V>> |
Matchers.hasValue(Matcher<? super V> valueMatcher) |
static <V> Matcher<? super Map<?,V>> |
Matchers.hasValue(V value) |
static Matcher<Node> |
Matchers.hasXPath(String xPath) |
static Matcher<Node> |
Matchers.hasXPath(String xPath,
Matcher<? super String> valueMatcher) |
static Matcher<Node> |
Matchers.hasXPath(String xPath,
NamespaceContext namespaceContext) |
static Matcher<Node> |
Matchers.hasXPath(String xPath,
NamespaceContext namespaceContext,
Matcher<? super String> valueMatcher) |
static <T> Matcher<T> |
Matchers.instanceOf(Class<?> type)
Is the value an instance of a particular type?
This version assumes no relationship between the required type and
the signature of the method that sets it up, for example in
assertThat(anObject, instanceOf(Thing.class)); |
static <T> Matcher<T> |
CoreMatchers.instanceOf(Class<?> type)
Is the value an instance of a particular type?
This version assumes no relationship between the required type and
the signature of the method that sets it up, for example in
assertThat(anObject, instanceOf(Thing.class)); |
static <T> Matcher<? super T> |
Matchers.is(Class<T> type)
This is a shortcut to the frequently used is(instanceOf(SomeClass.class)).
|
static <T> Matcher<? super T> |
CoreMatchers.is(Class<T> type)
This is a shortcut to the frequently used is(instanceOf(SomeClass.class)).
|
static <T> Matcher<T> |
Matchers.is(Matcher<T> matcher)
Decorates another Matcher, retaining the behavior but allowing tests
to be slightly more expressive.
|
static <T> Matcher<T> |
CoreMatchers.is(Matcher<T> matcher)
Decorates another Matcher, retaining the behavior but allowing tests
to be slightly more expressive.
|
static <T> Matcher<? super T> |
Matchers.is(T value)
This is a shortcut to the frequently used is(equalTo(x)).
|
static <T> Matcher<? super T> |
CoreMatchers.is(T value)
This is a shortcut to the frequently used is(equalTo(x)).
|
static <T> Matcher<T> |
Matchers.isIn(Collection<T> collection) |
static <T> Matcher<T> |
Matchers.isIn(T[] param1) |
static <T> Matcher<T> |
Matchers.isOneOf(T... elements) |
static <E> Matcher<Iterable<E>> |
Matchers.iterableWithSize(int size) |
static <E> Matcher<Iterable<E>> |
Matchers.iterableWithSize(Matcher<? super Integer> sizeMatcher) |
static <T extends Comparable<T>> |
Matchers.lessThan(T value)
Is value < expected?
|
static <T extends Comparable<T>> |
Matchers.lessThanOrEqualTo(T value)
Is value <= expected?
|
static <T> Matcher<T> |
Matchers.not(Matcher<T> matcher)
Inverts the rule.
|
static <T> Matcher<T> |
CoreMatchers.not(Matcher<T> matcher)
Inverts the rule.
|
static <T> Matcher<? super T> |
Matchers.not(T value)
This is a shortcut to the frequently used not(equalTo(x)).
|
static <T> Matcher<? super T> |
CoreMatchers.not(T value)
This is a shortcut to the frequently used not(equalTo(x)).
|
static <T> Matcher<T> |
Matchers.notNullValue()
Matches if value is not null.
|
static <T> Matcher<T> |
CoreMatchers.notNullValue()
Matches if value is not null.
|
static <T> Matcher<T> |
Matchers.notNullValue(Class<T> type)
Matches if value is not null.
|
static <T> Matcher<T> |
CoreMatchers.notNullValue(Class<T> type)
Matches if value is not null.
|
static <T> Matcher<T> |
Matchers.nullValue()
Matches if value is null.
|
static <T> Matcher<T> |
CoreMatchers.nullValue()
Matches if value is null.
|
static <T> Matcher<T> |
Matchers.nullValue(Class<T> type)
Matches if value is null.
|
static <T> Matcher<T> |
CoreMatchers.nullValue(Class<T> type)
Matches if value is null.
|
static <T> Matcher<T> |
Matchers.sameInstance(T object)
Creates a new instance of IsSame
|
static <T> Matcher<T> |
CoreMatchers.sameInstance(T object)
Creates a new instance of IsSame
|
static <T> Matcher<T> |
Matchers.samePropertyValuesAs(T expectedBean) |
static Matcher<String> |
Matchers.startsWith(String substring) |
static Matcher<String> |
CoreMatchers.startsWith(String substring) |
static <T> Matcher<Class<?>> |
Matchers.typeCompatibleWith(Class<T> baseType) |
Modifier and Type | Method and Description |
---|---|
static <T> Matcher<T> |
Matchers.allOf(Matcher<? super T>... matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<? super T>... matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
Matchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<? super T>... matchers)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<? super T>... matchers)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> IsArray<T> |
Matchers.array(Matcher<? super T>... elementMatchers)
Evaluates to true only if each matcher[i] is satisfied by array[i].
|
static <E> Matcher<E[]> |
Matchers.arrayContaining(Matcher<? super E>... matchers) |
static <E> Matcher<E[]> |
Matchers.arrayContainingInAnyOrder(Matcher<? super E>... matchers) |
static <E> Matcher<E[]> |
Matchers.arrayWithSize(Matcher<? super Integer> sizeMatcher)
Does array size satisfy a given matcher?
|
static <T> void |
MatcherAssert.assertThat(String reason,
T actual,
Matcher<? super T> matcher) |
static <T> void |
MatcherAssert.assertThat(T actual,
Matcher<? super T> matcher) |
static <LHS> CombinableMatcher<LHS> |
Matchers.both(Matcher<? super LHS> matcher)
This is useful for fluently combining matchers that must both pass.
|
static <LHS> CombinableMatcher<LHS> |
CoreMatchers.both(Matcher<? super LHS> matcher)
This is useful for fluently combining matchers that must both pass.
|
static <E> Matcher<Iterable<E>> |
Matchers.contains(Matcher<? super E>... item) |
static <E> Matcher<Iterable<E>> |
Matchers.contains(Matcher<E> item) |
static <T> Matcher<Iterable<T>> |
Matchers.containsInAnyOrder(Matcher<? super T>... item) |
static <E> Matcher<Iterable<E>> |
Matchers.containsInAnyOrder(Matcher<E> item) |
static <T> Matcher<T> |
Matchers.describedAs(String description,
Matcher<T> matcher,
Object... values)
Wraps an existing matcher and overrides the description when it fails.
|
static <T> Matcher<T> |
CoreMatchers.describedAs(String description,
Matcher<T> matcher,
Object... values)
Wraps an existing matcher and overrides the description when it fails.
|
static <LHS> CombinableMatcher<LHS> |
Matchers.either(Matcher<? super LHS> matcher)
This is useful for fluently combining matchers where either may pass, for example:
|
static <LHS> CombinableMatcher<LHS> |
CoreMatchers.either(Matcher<? super LHS> matcher)
This is useful for fluently combining matchers where either may pass, for example:
|
static <U> Matcher<Iterable<U>> |
Matchers.everyItem(Matcher<U> itemMatcher) |
static <U> Matcher<Iterable<U>> |
CoreMatchers.everyItem(Matcher<U> itemMatcher) |
static <K,V> Matcher<Map<? extends K,? extends V>> |
Matchers.hasEntry(Matcher<? super K> keyMatcher,
Matcher<? super V> valueMatcher) |
static <K,V> Matcher<Map<? extends K,? extends V>> |
Matchers.hasEntry(Matcher<? super K> keyMatcher,
Matcher<? super V> valueMatcher) |
static <T> Matcher<Iterable<? super T>> |
Matchers.hasItem(Matcher<? super T> elementMatcher) |
static <T> Matcher<Iterable<? super T>> |
CoreMatchers.hasItem(Matcher<? super T> elementMatcher) |
static <T> Matcher<T[]> |
Matchers.hasItemInArray(Matcher<? super T> elementMatcher)
Evaluates to true if any item in an array satisfies the given matcher.
|
static <T> Matcher<Iterable<T>> |
Matchers.hasItems(Matcher<? super T>... elementMatchers) |
static <T> Matcher<Iterable<T>> |
CoreMatchers.hasItems(Matcher<? super T>... elementMatchers) |
static <K> Matcher<Map<? super K,?>> |
Matchers.hasKey(Matcher<? super K> keyMatcher) |
static <T> Matcher<T> |
Matchers.hasProperty(String propertyName,
Matcher<?> value) |
static <E> Matcher<? super Collection<? extends E>> |
Matchers.hasSize(Matcher<? super Integer> size)
Does collection size satisfy a given matcher?
|
static <T> Matcher<T> |
Matchers.hasToString(Matcher<? super String> toStringMatcher)
Evaluates whether item.toString() satisfies a given matcher.
|
static <V> Matcher<? super Map<?,V>> |
Matchers.hasValue(Matcher<? super V> valueMatcher) |
static Matcher<Node> |
Matchers.hasXPath(String xPath,
Matcher<? super String> valueMatcher) |
static Matcher<Node> |
Matchers.hasXPath(String xPath,
NamespaceContext namespaceContext,
Matcher<? super String> valueMatcher) |
static <T> Matcher<T> |
Matchers.is(Matcher<T> matcher)
Decorates another Matcher, retaining the behavior but allowing tests
to be slightly more expressive.
|
static <T> Matcher<T> |
CoreMatchers.is(Matcher<T> matcher)
Decorates another Matcher, retaining the behavior but allowing tests
to be slightly more expressive.
|
static <E> Matcher<Iterable<E>> |
Matchers.iterableWithSize(Matcher<? super Integer> sizeMatcher) |
static <T> Matcher<T> |
Matchers.not(Matcher<T> matcher)
Inverts the rule.
|
static <T> Matcher<T> |
CoreMatchers.not(Matcher<T> matcher)
Inverts the rule.
|
Modifier and Type | Method and Description |
---|---|
static <T> Matcher<T> |
Matchers.allOf(Iterable<Matcher<? super T>> matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
CoreMatchers.allOf(Iterable<Matcher<? super T>> matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
Matchers.anyOf(Iterable<Matcher<? super T>> matchers)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
CoreMatchers.anyOf(Iterable<Matcher<? super T>> matchers)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <E> Matcher<E[]> |
Matchers.arrayContaining(List<Matcher<? super E>> matchers) |
static <E> Matcher<E[]> |
Matchers.arrayContainingInAnyOrder(Collection<Matcher<? super E>> matchers) |
static <E> Matcher<Iterable<E>> |
Matchers.contains(List<Matcher<? super E>> contents) |
static <T> Matcher<Iterable<T>> |
Matchers.containsInAnyOrder(Collection<Matcher<? super T>> matchers) |
Constructor and Description |
---|
FeatureMatcher(Matcher<? super U> subMatcher,
String featureDescription,
String featureName)
Constructor
|
Modifier and Type | Class and Description |
---|---|
class |
HasProperty<T>
Matcher that checks that an object has a JavaBean property
with the specified name.
|
class |
HasPropertyWithValue<T>
Matcher that asserts that a JavaBean property on an argument passed to the
mock object meets the provided matcher.
|
class |
SamePropertyValuesAs<T> |
static class |
SamePropertyValuesAs.PropertyMatcher |
Modifier and Type | Method and Description |
---|---|
static <T> Matcher<T> |
HasProperty.hasProperty(String propertyName) |
static <T> Matcher<T> |
HasPropertyWithValue.hasProperty(String propertyName,
Matcher<?> value) |
static <T> Matcher<T> |
SamePropertyValuesAs.samePropertyValuesAs(T expectedBean) |
Modifier and Type | Method and Description |
---|---|
static <T> Matcher<T> |
HasPropertyWithValue.hasProperty(String propertyName,
Matcher<?> value) |
Constructor and Description |
---|
HasPropertyWithValue(String propertyName,
Matcher<?> valueMatcher) |
Modifier and Type | Class and Description |
---|---|
class |
IsArray<T>
Matcher for array whose elements satisfy a sequence of matchers.
|
class |
IsArrayContaining<T>
Matches if an array contains an item satisfying a nested matcher.
|
class |
IsArrayContainingInAnyOrder<E> |
class |
IsArrayContainingInOrder<E> |
class |
IsArrayWithSize<E>
Matches if array size satisfies a nested matcher.
|
class |
IsCollectionWithSize<E>
Matches if collection size satisfies a nested matcher.
|
class |
IsEmptyCollection<E>
Tests if collection is empty.
|
class |
IsEmptyIterable<E>
Tests if collection is empty.
|
class |
IsIn<T> |
class |
IsIterableContainingInAnyOrder<T> |
class |
IsIterableContainingInOrder<E> |
class |
IsIterableWithSize<E> |
class |
IsMapContaining<K,V> |
class |
IsMapContainingKey<K> |
class |
IsMapContainingValue<V> |
Modifier and Type | Method and Description |
---|---|
static <E> Matcher<E[]> |
IsArrayContainingInOrder.arrayContaining(E... items) |
static <E> Matcher<E[]> |
IsArrayContainingInOrder.arrayContaining(List<Matcher<? super E>> matchers) |
static <E> Matcher<E[]> |
IsArrayContainingInOrder.arrayContaining(Matcher<? super E>... matchers) |
static <E> Matcher<E[]> |
IsArrayContainingInAnyOrder.arrayContainingInAnyOrder(Collection<Matcher<? super E>> matchers) |
static <E> Matcher<E[]> |
IsArrayContainingInAnyOrder.arrayContainingInAnyOrder(E... items) |
static <E> Matcher<E[]> |
IsArrayContainingInAnyOrder.arrayContainingInAnyOrder(Matcher<? super E>... matchers) |
static <E> Matcher<E[]> |
IsArrayWithSize.arrayWithSize(int size)
This is a shortcut to the frequently used arrayWithSize(equalTo(x)).
|
static <E> Matcher<E[]> |
IsArrayWithSize.arrayWithSize(Matcher<? super Integer> sizeMatcher)
Does array size satisfy a given matcher?
|
static <E> Matcher<Iterable<E>> |
IsIterableContainingInOrder.contains(E... items) |
static <E> Matcher<Iterable<E>> |
IsIterableContainingInOrder.contains(List<Matcher<? super E>> contents) |
static <E> Matcher<Iterable<E>> |
IsIterableContainingInOrder.contains(Matcher<? super E>... items) |
static <E> Matcher<Iterable<E>> |
IsIterableContainingInOrder.contains(Matcher<E> item) |
static <T> Matcher<Iterable<T>> |
IsIterableContainingInAnyOrder.containsInAnyOrder(Collection<Matcher<? super T>> matchers) |
static <T> Matcher<Iterable<T>> |
IsIterableContainingInAnyOrder.containsInAnyOrder(Matcher<? super T>... matchers) |
static <E> Matcher<Iterable<E>> |
IsIterableContainingInAnyOrder.containsInAnyOrder(Matcher<E> item) |
static <T> Matcher<Iterable<T>> |
IsIterableContainingInAnyOrder.containsInAnyOrder(T... items) |
static <E> Matcher<Collection<E>> |
IsEmptyCollection.empty()
Matches an empty collection.
|
static <E> Matcher<E[]> |
IsArrayWithSize.emptyArray()
Matches an empty array.
|
static <E> Matcher<Iterable<E>> |
IsEmptyIterable.emptyIterable()
Matches an empty iterable.
|
static <K,V> Matcher<Map<? extends K,? extends V>> |
IsMapContaining.hasEntry(K key,
V value) |
static <K,V> Matcher<Map<? extends K,? extends V>> |
IsMapContaining.hasEntry(Matcher<? super K> keyMatcher,
Matcher<? super V> valueMatcher) |
static <T> Matcher<T[]> |
IsArrayContaining.hasItemInArray(Matcher<? super T> elementMatcher)
Evaluates to true if any item in an array satisfies the given matcher.
|
static <T> Matcher<T[]> |
IsArrayContaining.hasItemInArray(T element)
This is a shortcut to the frequently used hasItemInArray(equalTo(x)).
|
static <K> Matcher<Map<? super K,?>> |
IsMapContainingKey.hasKey(K key) |
static <K> Matcher<Map<? super K,?>> |
IsMapContainingKey.hasKey(Matcher<? super K> keyMatcher) |
static <E> Matcher<? super Collection<? extends E>> |
IsCollectionWithSize.hasSize(int size)
This is a shortcut to the frequently used hasSize(equalTo(x)).
|
static <E> Matcher<? super Collection<? extends E>> |
IsCollectionWithSize.hasSize(Matcher<? super Integer> size)
Does collection size satisfy a given matcher?
|
static <V> Matcher<? super Map<?,V>> |
IsMapContainingValue.hasValue(Matcher<? super V> valueMatcher) |
static <V> Matcher<? super Map<?,V>> |
IsMapContainingValue.hasValue(V value) |
static <T> Matcher<T> |
IsIn.isIn(Collection<T> collection) |
static <T> Matcher<T> |
IsIn.isIn(T[] elements) |
static <T> Matcher<T> |
IsIn.isOneOf(T... elements) |
static <E> Matcher<Iterable<E>> |
IsIterableWithSize.iterableWithSize(int size) |
static <E> Matcher<Iterable<E>> |
IsIterableWithSize.iterableWithSize(Matcher<? super Integer> sizeMatcher) |
Modifier and Type | Method and Description |
---|---|
static <T> IsArray<T> |
IsArray.array(Matcher<? super T>... elementMatchers)
Evaluates to true only if each matcher[i] is satisfied by array[i].
|
static <E> Matcher<E[]> |
IsArrayContainingInOrder.arrayContaining(Matcher<? super E>... matchers) |
static <E> Matcher<E[]> |
IsArrayContainingInAnyOrder.arrayContainingInAnyOrder(Matcher<? super E>... matchers) |
static <E> Matcher<E[]> |
IsArrayWithSize.arrayWithSize(Matcher<? super Integer> sizeMatcher)
Does array size satisfy a given matcher?
|
static <E> Matcher<Iterable<E>> |
IsIterableContainingInOrder.contains(Matcher<? super E>... items) |
static <E> Matcher<Iterable<E>> |
IsIterableContainingInOrder.contains(Matcher<E> item) |
static <T> Matcher<Iterable<T>> |
IsIterableContainingInAnyOrder.containsInAnyOrder(Matcher<? super T>... matchers) |
static <E> Matcher<Iterable<E>> |
IsIterableContainingInAnyOrder.containsInAnyOrder(Matcher<E> item) |
static <K,V> Matcher<Map<? extends K,? extends V>> |
IsMapContaining.hasEntry(Matcher<? super K> keyMatcher,
Matcher<? super V> valueMatcher) |
static <K,V> Matcher<Map<? extends K,? extends V>> |
IsMapContaining.hasEntry(Matcher<? super K> keyMatcher,
Matcher<? super V> valueMatcher) |
static <T> Matcher<T[]> |
IsArrayContaining.hasItemInArray(Matcher<? super T> elementMatcher)
Evaluates to true if any item in an array satisfies the given matcher.
|
static <K> Matcher<Map<? super K,?>> |
IsMapContainingKey.hasKey(Matcher<? super K> keyMatcher) |
static <E> Matcher<? super Collection<? extends E>> |
IsCollectionWithSize.hasSize(Matcher<? super Integer> size)
Does collection size satisfy a given matcher?
|
static <V> Matcher<? super Map<?,V>> |
IsMapContainingValue.hasValue(Matcher<? super V> valueMatcher) |
static <E> Matcher<Iterable<E>> |
IsIterableWithSize.iterableWithSize(Matcher<? super Integer> sizeMatcher) |
Modifier and Type | Method and Description |
---|---|
static <E> Matcher<E[]> |
IsArrayContainingInOrder.arrayContaining(List<Matcher<? super E>> matchers) |
static <E> Matcher<E[]> |
IsArrayContainingInAnyOrder.arrayContainingInAnyOrder(Collection<Matcher<? super E>> matchers) |
static <E> Matcher<Iterable<E>> |
IsIterableContainingInOrder.contains(List<Matcher<? super E>> contents) |
static <T> Matcher<Iterable<T>> |
IsIterableContainingInAnyOrder.containsInAnyOrder(Collection<Matcher<? super T>> matchers) |
Constructor and Description |
---|
IsArray(Matcher<? super T>[] elementMatchers) |
IsArrayContaining(Matcher<? super T> elementMatcher) |
IsArrayWithSize(Matcher<? super Integer> sizeMatcher) |
IsCollectionWithSize(Matcher<? super Integer> sizeMatcher) |
IsIterableWithSize(Matcher<? super Integer> sizeMatcher) |
IsMapContaining(Matcher<? super K> keyMatcher,
Matcher<? super V> valueMatcher) |
IsMapContaining(Matcher<? super K> keyMatcher,
Matcher<? super V> valueMatcher) |
IsMapContainingKey(Matcher<? super K> keyMatcher) |
IsMapContainingValue(Matcher<? super V> valueMatcher) |
Constructor and Description |
---|
IsArrayContainingInAnyOrder(Collection<Matcher<? super E>> matchers) |
IsArrayContainingInOrder(List<Matcher<? super E>> matchers) |
IsIterableContainingInAnyOrder(Collection<Matcher<? super T>> matchers) |
IsIterableContainingInOrder(List<Matcher<? super E>> matchers) |
Modifier and Type | Class and Description |
---|---|
class |
AllOf<T>
Calculates the logical conjunction of multiple matchers.
|
class |
AnyOf<T>
Calculates the logical disjunction of multiple matchers.
|
class |
CombinableMatcher<T> |
class |
DescribedAs<T>
Provides a custom description to another matcher.
|
class |
Every<T> |
class |
Is<T>
Decorates another Matcher, retaining the behavior but allowing tests
to be slightly more expressive.
|
class |
IsAnything<T>
A matcher that always returns
true . |
class |
IsCollectionContaining<T> |
class |
IsEqual<T>
Is the value equal to another value, as tested by the
Object.equals(java.lang.Object) invokedMethod? |
class |
IsInstanceOf
Tests whether the value is an instance of a class.
|
class |
IsNot<T>
Calculates the logical negation of a matcher.
|
class |
IsNull<T>
Is the value null?
|
class |
IsSame<T>
Is the value the same object as another value?
|
class |
StringContains
Tests if the argument is a string that contains a substring.
|
class |
StringEndsWith
Tests if the argument is a string that contains a substring.
|
class |
StringStartsWith
Tests if the argument is a string that contains a substring.
|
class |
SubstringMatcher |
Modifier and Type | Method and Description |
---|---|
static <T> Matcher<T> |
AllOf.allOf(Iterable<Matcher<? super T>> matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<? super T>... matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
IsInstanceOf.any(Class<T> type)
Is the value an instance of a particular type?
Use this version to make generics conform, for example in
the JMock clause
with(any(Thing.class)) |
static <T> Matcher<T> |
IsAnything.anything()
This matcher always evaluates to true.
|
static <T> Matcher<T> |
IsAnything.anything(String description)
This matcher always evaluates to true.
|
static Matcher<String> |
StringContains.containsString(String substring) |
static <T> Matcher<T> |
DescribedAs.describedAs(String description,
Matcher<T> matcher,
Object... values)
Wraps an existing matcher and overrides the description when it fails.
|
static Matcher<String> |
StringEndsWith.endsWith(String substring) |
static <T> Matcher<? super T> |
IsEqual.equalTo(T operand)
Is the value equal to another value, as tested by the
Object.equals(java.lang.Object) invokedMethod? |
static <U> Matcher<Iterable<U>> |
Every.everyItem(Matcher<U> itemMatcher) |
static <T> Matcher<Iterable<? super T>> |
IsCollectionContaining.hasItem(Matcher<? super T> elementMatcher) |
static <T> Matcher<Iterable<? super T>> |
IsCollectionContaining.hasItem(T element) |
static <T> Matcher<Iterable<T>> |
IsCollectionContaining.hasItems(Matcher<? super T>... elementMatchers) |
static <T> Matcher<Iterable<T>> |
IsCollectionContaining.hasItems(T... elements) |
static <T> Matcher<T> |
IsInstanceOf.instanceOf(Class<?> type)
Is the value an instance of a particular type?
This version assumes no relationship between the required type and
the signature of the method that sets it up, for example in
assertThat(anObject, instanceOf(Thing.class)); |
static <T> Matcher<? super T> |
Is.is(Class<T> type)
This is a shortcut to the frequently used is(instanceOf(SomeClass.class)).
|
static <T> Matcher<T> |
Is.is(Matcher<T> matcher)
Decorates another Matcher, retaining the behavior but allowing tests
to be slightly more expressive.
|
static <T> Matcher<? super T> |
Is.is(T value)
This is a shortcut to the frequently used is(equalTo(x)).
|
static <T> Matcher<T> |
IsNot.not(Matcher<T> matcher)
Inverts the rule.
|
static <T> Matcher<? super T> |
IsNot.not(T value)
This is a shortcut to the frequently used not(equalTo(x)).
|
static <T> Matcher<T> |
IsNull.notNullValue()
Matches if value is not null.
|
static <T> Matcher<T> |
IsNull.notNullValue(Class<T> type)
Matches if value is not null.
|
static <T> Matcher<T> |
IsNull.nullValue()
Matches if value is null.
|
static <T> Matcher<T> |
IsNull.nullValue(Class<T> type)
Matches if value is null.
|
static <T> Matcher<T> |
IsSame.sameInstance(T object)
Creates a new instance of IsSame
|
static Matcher<String> |
StringStartsWith.startsWith(String substring) |
Modifier and Type | Method and Description |
---|---|
static <T> Matcher<T> |
AllOf.allOf(Matcher<? super T>... matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> Matcher<T> |
AllOf.allOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
CombinableMatcher<T> |
CombinableMatcher.and(Matcher<? super T> other) |
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<? super T>... matchers)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Matcher<T> first,
Matcher<? super T> second,
Matcher<? super T> third,
Matcher<? super T> fourth,
Matcher<? super T> fifth,
Matcher<? super T> sixth)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
static <LHS> CombinableMatcher<LHS> |
CombinableMatcher.both(Matcher<? super LHS> matcher)
This is useful for fluently combining matchers that must both pass.
|
static <T> Matcher<T> |
DescribedAs.describedAs(String description,
Matcher<T> matcher,
Object... values)
Wraps an existing matcher and overrides the description when it fails.
|
static <LHS> CombinableMatcher<LHS> |
CombinableMatcher.either(Matcher<? super LHS> matcher)
This is useful for fluently combining matchers where either may pass, for example:
|
static <U> Matcher<Iterable<U>> |
Every.everyItem(Matcher<U> itemMatcher) |
static <T> Matcher<Iterable<? super T>> |
IsCollectionContaining.hasItem(Matcher<? super T> elementMatcher) |
static <T> Matcher<Iterable<T>> |
IsCollectionContaining.hasItems(Matcher<? super T>... elementMatchers) |
static <T> Matcher<T> |
Is.is(Matcher<T> matcher)
Decorates another Matcher, retaining the behavior but allowing tests
to be slightly more expressive.
|
static <T> Matcher<T> |
IsNot.not(Matcher<T> matcher)
Inverts the rule.
|
CombinableMatcher<T> |
CombinableMatcher.or(Matcher<? super T> other) |
Modifier and Type | Method and Description |
---|---|
static <T> Matcher<T> |
AllOf.allOf(Iterable<Matcher<? super T>> matchers)
Evaluates to true only if ALL of the passed in matchers evaluate to true.
|
static <T> AnyOf<T> |
AnyOf.anyOf(Iterable<Matcher<? super T>> matchers)
Evaluates to true if ANY of the passed in matchers evaluate to true.
|
Constructor and Description |
---|
CombinableMatcher(Matcher<? super T> matcher) |
DescribedAs(String descriptionTemplate,
Matcher<T> matcher,
Object[] values) |
Every(Matcher<? super T> matcher) |
Is(Matcher<T> matcher) |
IsCollectionContaining(Matcher<? super T> elementMatcher) |
IsNot(Matcher<T> matcher) |
Constructor and Description |
---|
AllOf(Iterable<Matcher<? super T>> matchers) |
AnyOf(Iterable<Matcher<? super T>> matchers) |
Modifier and Type | Class and Description |
---|---|
class |
IsCloseTo
Is the value a number equal to a value within some range of
acceptable error?
|
class |
OrderingComparison<T extends Comparable<T>> |
Modifier and Type | Method and Description |
---|---|
static Matcher<Double> |
IsCloseTo.closeTo(double operand,
double error) |
static <T extends Comparable<T>> |
OrderingComparison.comparesEqualTo(T value)
Is value = expected?
|
static <T extends Comparable<T>> |
OrderingComparison.greaterThan(T value)
Is value > expected?
|
static <T extends Comparable<T>> |
OrderingComparison.greaterThanOrEqualTo(T value)
Is value >= expected?
|
static <T extends Comparable<T>> |
OrderingComparison.lessThan(T value)
Is value < expected?
|
static <T extends Comparable<T>> |
OrderingComparison.lessThanOrEqualTo(T value)
Is value <= expected?
|
Modifier and Type | Class and Description |
---|---|
class |
HasToString<T> |
class |
IsCompatibleType<T> |
class |
IsEventFrom
Tests if the value is an event announced by a specific object.
|
Modifier and Type | Method and Description |
---|---|
static Matcher<EventObject> |
IsEventFrom.eventFrom(Class<? extends EventObject> eventClass,
Object source)
Constructs an IsEventFrom Matcher that returns true for any object
derived from eventClass announced by source.
|
static Matcher<EventObject> |
IsEventFrom.eventFrom(Object source)
Constructs an IsEventFrom Matcher that returns true for any object
derived from
EventObject announced by source
. |
static <T> Matcher<T> |
HasToString.hasToString(Matcher<? super String> toStringMatcher)
Evaluates whether item.toString() satisfies a given matcher.
|
static <T> Matcher<T> |
HasToString.hasToString(String expectedToString)
This is a shortcut to the frequently used has_string(equalTo(x)).
|
static <T> Matcher<Class<?>> |
IsCompatibleType.typeCompatibleWith(Class<T> baseType) |
Modifier and Type | Method and Description |
---|---|
static <T> Matcher<T> |
HasToString.hasToString(Matcher<? super String> toStringMatcher)
Evaluates whether item.toString() satisfies a given matcher.
|
Constructor and Description |
---|
HasToString(Matcher<? super String> toStringMatcher) |
Modifier and Type | Class and Description |
---|---|
class |
IsEmptyString
Matches empty Strings (and null).
|
class |
IsEqualIgnoringCase
Tests if a string is equal to another string, regardless of the case.
|
class |
IsEqualIgnoringWhiteSpace
Tests if a string is equal to another string, ignoring any changes in whitespace.
|
class |
StringContainsInOrder |
Modifier and Type | Method and Description |
---|---|
static Matcher<String> |
IsEqualIgnoringCase.equalToIgnoringCase(String string) |
static Matcher<String> |
IsEqualIgnoringWhiteSpace.equalToIgnoringWhiteSpace(String string) |
static Matcher<String> |
IsEmptyString.isEmptyOrNullString()
Matches if value is null or zero-length string.
|
static Matcher<String> |
IsEmptyString.isEmptyString()
Matches if value is null or zero-length string.
|
static Matcher<String> |
StringContainsInOrder.stringContainsInOrder(Iterable<String> substrings) |
Modifier and Type | Class and Description |
---|---|
class |
HasXPath
Applies a Matcher to a given XML Node in an existing XML Node tree, specified by an XPath expression.
|
Modifier and Type | Method and Description |
---|---|
static Matcher<Node> |
HasXPath.hasXPath(String xPath) |
static Matcher<Node> |
HasXPath.hasXPath(String xPath,
Matcher<? super String> valueMatcher) |
static Matcher<Node> |
HasXPath.hasXPath(String xPath,
NamespaceContext namespaceContext) |
static Matcher<Node> |
HasXPath.hasXPath(String xPath,
NamespaceContext namespaceContext,
Matcher<? super String> valueMatcher) |
Modifier and Type | Method and Description |
---|---|
static Matcher<Node> |
HasXPath.hasXPath(String xPath,
Matcher<? super String> valueMatcher) |
static Matcher<Node> |
HasXPath.hasXPath(String xPath,
NamespaceContext namespaceContext,
Matcher<? super String> valueMatcher) |
Constructor and Description |
---|
HasXPath(String xPathExpression,
Matcher<? super String> valueMatcher) |
HasXPath(String xPathExpression,
NamespaceContext namespaceContext,
Matcher<? super String> valueMatcher) |
Modifier and Type | Class and Description |
---|---|
class |
ArgumentMatcher<T>
Allows creating customized argument matchers.
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
Matchers.argThat(Matcher<T> matcher)
Allows creating custom argument matchers.
|
static boolean |
Matchers.booleanThat(Matcher<Boolean> matcher)
Allows creating custom argument matchers.
|
static byte |
Matchers.byteThat(Matcher<Byte> matcher)
Allows creating custom argument matchers.
|
static char |
Matchers.charThat(Matcher<Character> matcher)
Allows creating custom argument matchers.
|
static double |
Matchers.doubleThat(Matcher<Double> matcher)
Allows creating custom argument matchers.
|
static float |
Matchers.floatThat(Matcher<Float> matcher)
Allows creating custom argument matchers.
|
static int |
Matchers.intThat(Matcher<Integer> matcher)
Allows creating custom argument matchers.
|
static long |
Matchers.longThat(Matcher<Long> matcher)
Allows creating custom argument matchers.
|
static short |
Matchers.shortThat(Matcher<Short> matcher)
Allows creating custom argument matchers.
|
Modifier and Type | Method and Description |
---|---|
protected List<Matcher> |
Invocation.argumentsToMatchers() |
List<Matcher> |
InvocationMatcher.getMatchers() |
Modifier and Type | Method and Description |
---|---|
protected String |
Invocation.toString(List<Matcher> matchers,
PrintSettings printSettings) |
Constructor and Description |
---|
InvocationMatcher(Invocation invocation,
List<Matcher> matchers) |
Modifier and Type | Class and Description |
---|---|
class |
And |
class |
Any |
class |
AnyVararg |
class |
ArrayEquals |
class |
CapturingMatcher<T> |
class |
CompareEqual<T extends Comparable<T>> |
class |
CompareTo<T extends Comparable<T>> |
class |
Contains |
class |
EndsWith |
class |
Equals |
class |
EqualsWithDelta |
class |
Find |
class |
GreaterOrEqual<T extends Comparable<T>> |
class |
GreaterThan<T extends Comparable<T>> |
class |
InstanceOf |
class |
LessOrEqual<T extends Comparable<T>> |
class |
LessThan<T extends Comparable<T>> |
class |
LocalizedMatcher |
class |
Matches |
class |
Not |
class |
NotNull |
class |
Null |
class |
Or |
class |
Same |
class |
StartsWith |
Modifier and Type | Field and Description |
---|---|
static Matcher |
AnyVararg.ANY_VARARG |
Modifier and Type | Method and Description |
---|---|
Matcher |
MatcherDecorator.getActualMatcher() |
Matcher |
LocalizedMatcher.getActualMatcher() |
Modifier and Type | Method and Description |
---|---|
String |
MatchersPrinter.getArgumentsBlock(List<Matcher> matchers,
PrintSettings printSettings) |
String |
MatchersPrinter.getArgumentsLine(List<Matcher> matchers,
PrintSettings printSettings) |
Constructor and Description |
---|
LocalizedMatcher(Matcher actualMatcher) |
Not(Matcher first) |
Constructor and Description |
---|
And(List<Matcher> matchers) |
Or(List<Matcher> matchers) |
Modifier and Type | Class and Description |
---|---|
class |
ReflectionEquals |
Modifier and Type | Method and Description |
---|---|
List<Matcher> |
ArgumentMatcherStorageImpl.pullMatchers() |
List<Matcher> |
ArgumentMatcherStorage.pullMatchers() |
Modifier and Type | Method and Description |
---|---|
HandyReturnValues |
ArgumentMatcherStorageImpl.reportMatcher(Matcher matcher) |
HandyReturnValues |
ArgumentMatcherStorage.reportMatcher(Matcher matcher) |
Modifier and Type | Method and Description |
---|---|
Integer[] |
ArgumentMatchingTool.getSuspiciouslyNotMatchingArgsIndexes(List<Matcher> matchers,
Object[] arguments)
Suspiciously not matching arguments are those that don't match, the toString() representation is the same but types are different.
|
Copyright © 2016. All rights reserved.