/*
* Copyright (c) 2016 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.invocation;
import org.mockito.ArgumentMatcher;
import java.util.List;
/**
* MatchableInvocation
wraps {@link Invocation} instance
* and holds argument matchers associated with that invocation.
* It is used during verification process:
*
*
* mock.foo(); // <- invocation
* verify(mock).bar(); // <- matchable invocation
*
*
* @since 2.2.12
*/
public interface MatchableInvocation extends DescribedInvocation {
/**
* The actual invocation Mockito will match against.
*
* @since 2.2.12
*/
Invocation getInvocation();
/**
* The argument matchers of this invocation.
* When the invocation is declared without argument matchers (e.g. using plain arguments)
* Mockito still converts them into {@link ArgumentMatcher} instances
* that use 'eq' matching via {@link org.mockito.Mockito#eq(Object)}.
*
* @since 2.2.12
*/
List* Makes this instance of matchable invocation capture all arguments of provided invocation. * * @param invocation the invocation to capture the arguments from * * @since 2.2.12 */ void captureArgumentsFrom(Invocation invocation); }