Class EqualsResultMatcher<U>

java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.DiagnosingMatcher<U>
org.springframework.integration.test.matcher.EqualsResultMatcher<U>
All Implemented Interfaces:
org.hamcrest.Matcher<U>, org.hamcrest.SelfDescribing

public class EqualsResultMatcher<U>
extends org.hamcrest.DiagnosingMatcher<U>
A matcher that evaluates against the result of invoking a function, wrapped by the Supplier The goal is to defer the computation until the matcher needs to be actually evaluated. Mainly useful in conjunction with retrying matchers such as EventuallyMatcher
Since:
4.2
  • Constructor Summary

    Constructors 
    Constructor Description
    EqualsResultMatcher​(java.util.function.Supplier<U> supplier)  
  • Method Summary

    Modifier and Type Method Description
    void describeTo​(org.hamcrest.Description description)  
    static <U> EqualsResultMatcher<U> equalsResult​(java.util.function.Supplier<U> supplier)  
    protected boolean matches​(java.lang.Object item, org.hamcrest.Description mismatchDescription)  

    Methods inherited from class org.hamcrest.DiagnosingMatcher

    describeMismatch, matches

    Methods inherited from class org.hamcrest.BaseMatcher

    _dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • matches

      protected boolean matches​(java.lang.Object item, org.hamcrest.Description mismatchDescription)
      Specified by:
      matches in class org.hamcrest.DiagnosingMatcher<U>
    • describeTo

      public void describeTo​(org.hamcrest.Description description)
    • equalsResult

      public static <U> EqualsResultMatcher<U> equalsResult​(java.util.function.Supplier<U> supplier)