Class ProcedureMatcher2<Param,Argument>

java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeDiagnosingMatcher<org.dmfs.jems2.Function<? super Param,? extends org.dmfs.jems2.Procedure<? super Argument>>>
org.dmfs.jems2.hamcrest.matchers.procedure.ProcedureMatcher2<Param,Argument>
All Implemented Interfaces:
org.hamcrest.Matcher<org.dmfs.jems2.Function<? super Param,? extends org.dmfs.jems2.Procedure<? super Argument>>>, org.hamcrest.SelfDescribing

public final class ProcedureMatcher2<Param,Argument> extends org.hamcrest.TypeSafeDiagnosingMatcher<org.dmfs.jems2.Function<? super Param,? extends org.dmfs.jems2.Procedure<? super Argument>>>
Usage like

     // Procedure with single mocked ctor argument
     assertThat(param -> new Testee(param, "x"), processes(()-> param, arg, equalTo(...)));
 
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProcedureMatcher2(org.dmfs.jems2.Generator<Param> paramGenerator, Argument argument, org.hamcrest.Matcher<? super Param> delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    describeTo(org.hamcrest.Description description)
     
    protected boolean
    matchesSafely(org.dmfs.jems2.Function<? super Param,? extends org.dmfs.jems2.Procedure<? super Argument>> item, org.hamcrest.Description mismatchDescription)
     
    static <Param, Argument>
    org.hamcrest.Matcher<org.dmfs.jems2.Function<? super Param,? extends org.dmfs.jems2.Procedure<? super Argument>>>
    processes(org.dmfs.jems2.Generator<Param> paramGenerator, Argument argument, org.hamcrest.Matcher<? super Param> delegate)
     

    Methods inherited from class org.hamcrest.TypeSafeDiagnosingMatcher

    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

    • ProcedureMatcher2

      public ProcedureMatcher2(org.dmfs.jems2.Generator<Param> paramGenerator, Argument argument, org.hamcrest.Matcher<? super Param> delegate)
  • Method Details

    • processes

      public static <Param, Argument> org.hamcrest.Matcher<org.dmfs.jems2.Function<? super Param,? extends org.dmfs.jems2.Procedure<? super Argument>>> processes(org.dmfs.jems2.Generator<Param> paramGenerator, Argument argument, org.hamcrest.Matcher<? super Param> delegate)
    • matchesSafely

      protected boolean matchesSafely(org.dmfs.jems2.Function<? super Param,? extends org.dmfs.jems2.Procedure<? super Argument>> item, org.hamcrest.Description mismatchDescription)
      Specified by:
      matchesSafely in class org.hamcrest.TypeSafeDiagnosingMatcher<org.dmfs.jems2.Function<? super Param,? extends org.dmfs.jems2.Procedure<? super Argument>>>
    • describeTo

      public void describeTo(org.hamcrest.Description description)