Class ProcedureMatcher<Argument>

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

public final class ProcedureMatcher<Argument> extends org.hamcrest.TypeSafeDiagnosingMatcher<org.dmfs.jems2.Procedure<? super Argument>>
A Matcher to test simple Procedures.

 // simple case > no mocked Ctor arguments
 assertThat(new Testee("1"), processes(()->arg, equalTo(...)));
 
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProcedureMatcher(org.dmfs.jems2.Generator<? extends Argument> argumentGenerator, org.hamcrest.Matcher<? super Argument> delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    describeTo(org.hamcrest.Description description)
     
    protected boolean
    matchesSafely(org.dmfs.jems2.Procedure<? super Argument> item, org.hamcrest.Description mismatchDescription)
     
    static <Argument> org.hamcrest.Matcher<org.dmfs.jems2.Procedure<? super Argument>>
    processes(org.dmfs.jems2.Generator<? extends Argument> argumentGenerator, org.hamcrest.Matcher<? super Argument> 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

    • ProcedureMatcher

      public ProcedureMatcher(org.dmfs.jems2.Generator<? extends Argument> argumentGenerator, org.hamcrest.Matcher<? super Argument> delegate)
  • Method Details

    • processes

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

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

      public void describeTo(org.hamcrest.Description description)