Class TupleMatchers

java.lang.Object
org.elasticsearch.test.hamcrest.TupleMatchers

public class TupleMatchers
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    TupleMatchers()  
  • Method Summary

    Modifier and Type Method Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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's v1() matches the specified v1Matcher and 2. the examined tuple's v2() matches the specified v2Matcher For example:
      assertThat(Tuple.tuple("myValue1", "myValue2"), isTuple(startsWith("my"), containsString("Val")))