Package org.eclipse.jetty.toolchain.test
Class ExtraMatchers
java.lang.Object
org.eclipse.jetty.toolchain.test.ExtraMatchers
Extra Matchers for the Junit Hamcrest users out there.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ExtraMatchers
public ExtraMatchers()
-
-
Method Details
-
ordered
Creates a matcher forIterable
s that matches when consecutive passes over the examinedIterable
yield at least one item that is matched by the corresponding matcher from the specifieditemMatchers
. Whilst matching, each traversal of the examinedIterable
will stop as soon as a matching item is found.For example:
assertThat(Arrays.asList("foo","bar","baz"),hasItems(endsWith("z"),endsWith("o")))
- Type Parameters:
T
- the type- Parameters:
itemMatchers
- the matchers to apply to items provided by the examinedIterable
- Returns:
- the matcher
-