Package org.elasticsearch.test.hamcrest
Class TupleMatchers
java.lang.Object
org.elasticsearch.test.hamcrest.TupleMatchers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <V1,
V2> org.elasticsearch.test.hamcrest.TupleMatchers.TupleMatcher<? extends V1, ? extends V2> isTuple
(org.hamcrest.Matcher<? super V1> v1Matcher, org.hamcrest.Matcher<? super V2> v2Matcher) Creates a matcher that matches iff: 1.
-
Constructor Details
-
TupleMatchers
public TupleMatchers()
-
-
Method Details
-
isTuple
public static <V1,V2> org.elasticsearch.test.hamcrest.TupleMatchers.TupleMatcher<? extends V1,? extends V2> isTuple(org.hamcrest.Matcher<? super V1> v1Matcher, org.hamcrest.Matcher<? super V2> v2Matcher) Creates a matcher that matches iff: 1. the examined tuple'sv1()
matches the specifiedv1Matcher
and 2. the examined tuple'sv2()
matches the specifiedv2Matcher
For example:assertThat(Tuple.tuple("myValue1", "myValue2"), isTuple(startsWith("my"), containsString("Val")))
-