|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hamcrest.BaseMatcher<List<?>> org.axonframework.test.matchers.ListMatcher
public abstract class ListMatcher
Abstract implementation for matchers that use event-specific matchers to match against a list of items.
Constructor Summary | |
---|---|
protected |
ListMatcher(org.hamcrest.Matcher<?>... matchers)
Creates an abstract matcher to match a number of Matchers against Events contained inside a Collection. |
Method Summary | |
---|---|
protected abstract void |
describeCollectionType(org.hamcrest.Description description)
Describes the type of collection expected. |
void |
describeTo(org.hamcrest.Description description)
|
protected String |
failedMatcherMessage()
The message to append behind a failing matcher. |
protected String |
getLastSeparator()
The separator to use between the two last events. |
protected List<org.hamcrest.Matcher<?>> |
getMatchers()
Returns a read-only list of Matchers, in the order they were provided in the constructor. |
boolean |
matches(Object item)
|
protected abstract boolean |
matchesList(List<?> item)
Evaluates the matcher for argument item . |
protected boolean |
matchRemainder(Iterator<org.hamcrest.Matcher<?>> matcherIterator)
Matches all the remaining Matchers in the given matcherIterator against null . |
protected void |
reportFailed(org.hamcrest.Matcher matcher)
Report the given matcher as a failing matcher. |
Methods inherited from class org.hamcrest.BaseMatcher |
---|
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ListMatcher(org.hamcrest.Matcher<?>... matchers)
matchers
- The matchers to match the individual Events in the CollectionMethod Detail |
---|
public boolean matches(Object item)
protected abstract boolean matchesList(List<?> item)
item
. The item has been verified to be a list, but the exact
type of contents of a list cannot be verified, due to Erasure of Generic Types.
item
- the object against which the matcher is evaluated.
true
if item
matches, otherwise false
.BaseMatcher
protected boolean matchRemainder(Iterator<org.hamcrest.Matcher<?>> matcherIterator)
matcherIterator
against null
.
matcherIterator
- The iterator potentially containing more matchers
protected void reportFailed(org.hamcrest.Matcher matcher)
matcher
as a failing matcher. This will be used in the error reporting.
matcher
- The failing matcher.protected List<org.hamcrest.Matcher<?>> getMatchers()
protected abstract void describeCollectionType(org.hamcrest.Description description)
description
- the description to append the collection type topublic void describeTo(org.hamcrest.Description description)
protected String failedMatcherMessage()
protected String getLastSeparator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |