Class MockInteractionMatcher<T>
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeDiagnosingMatcher<T>
org.dmfs.jems2.hamcrest.matchers.mockito.MockInteractionMatcher<T>
- All Implemented Interfaces:
org.hamcrest.Matcher<T>,org.hamcrest.SelfDescribing
public final class MockInteractionMatcher<T>
extends org.hamcrest.TypeSafeDiagnosingMatcher<T>
A Matcher for interactions with Mockito mocks.
Note that, by design this matcher mutates the mock.
-
Constructor Summary
ConstructorsConstructorDescriptionMockInteractionMatcher(org.dmfs.jems2.Function<T, org.mockito.InOrder> mOrderFactory, Iterable<? extends org.dmfs.jems2.Procedure<? super T>> mTestProcedures, String mDescription) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> org.hamcrest.Matcher<T>called(org.dmfs.jems2.Procedure<? super T>... verifications) static <T> org.hamcrest.Matcher<T>calledInOrder(org.dmfs.jems2.Procedure<? super T>... verifications) voiddescribeTo(org.hamcrest.Description description) protected booleanmatchesSafely(T item, org.hamcrest.Description mismatchDescription) static <T> org.hamcrest.Matcher<T>Methods inherited from class org.hamcrest.TypeSafeDiagnosingMatcher
describeMismatch, matchesMethods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
-
Constructor Details
-
MockInteractionMatcher
-
-
Method Details
-
notCalled
public static <T> org.hamcrest.Matcher<T> notCalled() -
called
@SafeVarargs public static <T> org.hamcrest.Matcher<T> called(org.dmfs.jems2.Procedure<? super T>... verifications) -
calledInOrder
@SafeVarargs public static <T> org.hamcrest.Matcher<T> calledInOrder(org.dmfs.jems2.Procedure<? super T>... verifications) -
matchesSafely
- Specified by:
matchesSafelyin classorg.hamcrest.TypeSafeDiagnosingMatcher<T>
-
describeTo
public void describeTo(org.hamcrest.Description description)
-