public class HasItemsInOrderMatcher<T> extends org.hamcrest.TypeSafeDiagnosingMatcher<Iterable<T>>
assertThat( [1,2,3,4,5,6], hasMatchingItemsInOrder(1,4,6) )
assertThat( [1,2,3,4,5,6], hasMatchingItemsInOrder(6))
assertThat( [1,2,3,4,5,6], hasMatchingItemsInOrder() )
assertThat( [], hasMatchingItemsInOrder() )
assertThat( [1,1,2,2,3,3], hasMatchingItemsInOrder(1,2,3)
assertThat( [1,2,3,4,5,6], not(hasMatchingItemsInOrder(1,2,7)) )
assertThat( [1,2,3,4,5,6], not(hasMatchingItemsInOrder(1,1)) )
assertThat( [], not(hasMatchingItemsInOrder(1)) )
Modifier and Type | Method and Description |
---|---|
void |
describeTo(org.hamcrest.Description description) |
static <U> org.hamcrest.Matcher<Iterable<U>> |
hasItemsInOrder(Iterable<U> expected) |
static <U> org.hamcrest.Matcher<Iterable<U>> |
hasItemsInOrder(U... expected) |
static <U> org.hamcrest.Matcher<Iterable<U>> |
hasMatchingItemsInOrder(Iterable<org.hamcrest.Matcher<U>> expected) |
protected boolean |
matchesSafely(Iterable<T> items,
org.hamcrest.Description mismatchDescription) |
protected boolean matchesSafely(Iterable<T> items, org.hamcrest.Description mismatchDescription)
public void describeTo(org.hamcrest.Description description)
public static <U> org.hamcrest.Matcher<Iterable<U>> hasMatchingItemsInOrder(Iterable<org.hamcrest.Matcher<U>> expected)
@SafeVarargs public static <U> org.hamcrest.Matcher<Iterable<U>> hasItemsInOrder(U... expected)
Copyright © 2002-2017 Atlassian. All Rights Reserved.