public class ExactSequenceMatcher<T> extends ListMatcher<T>
matchersagainst the event in a list at their respective index. That means the first matcher must match against the first event, the second matcher against the second event, and so forth. If the number of Events is larger than the number of matchers, the excess events are not evaluated. Use
Matchers.exactSequenceOf(org.hamcrest.Matcher)to match the sequence exactly. If there are more matchers than Events, the remainder of matchers is evaluated against a
|Constructor and Description|
Construct a matcher that will return true if all the given
|Modifier and Type||Method and Description|
Describes the type of collection expected.
Evaluates the matcher for argument
describeTo, failedMatcherMessage, getLastSeparator, getMatchers, matches, matchRemainder, reportFailed
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, toString
@SafeVarargs public ExactSequenceMatcher(org.hamcrest.Matcher<? super T>... matchers)
matchersmatch against the event with the same index in a given List if Events.
matchers- The matchers that must match against at least one Event in the list.
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.
protected void describeCollectionType(org.hamcrest.Description description)
Copyright © 2010–2020. All rights reserved.