Package org.elasticsearch.test.hamcrest
Class TupleMatchers
java.lang.Object
org.elasticsearch.test.hamcrest.TupleMatchers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <V1,V2> org.hamcrest.Matcher <org.elasticsearch.core.Tuple<? 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.hamcrest.Matcher<org.elasticsearch.core.Tuple<? 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 specifiedv1Matcherand 2. the examined tuple'sv2()matches the specifiedv2MatcherFor example:assertThat(Tuple.tuple("myValue1", "myValue2"), isTuple(startsWith("my"), containsString("Val")))
-