org.mockito.internal.verification.api.VerificationData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockito-core Show documentation
Show all versions of mockito-core Show documentation
Mockito mock objects library core API and implementation
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.verification.api;
import java.util.List;
import org.mockito.invocation.Invocation;
import org.mockito.invocation.MatchableInvocation;
/**
* Data needed to perform verification of interactions.
* This interface is considered public even though it lives in private package.
* In the next major version of Mockito, this class will be moved to public space.
*/
public interface VerificationData {
/**
* All invocations recorded on the mock object that is being verified.
* Does not include invocations recorded on other mock objects.
*/
List getAllInvocations();
/**
* The target or wanted invocation.
* Below example illustrates what is the 'target' invocation:
*
* mock.foo(); // <- invocation 1
* mock.bar(); // <- invocation 2
*
* verify(mock).bar(); // <- target invocation
*
*
* Target invocation can contain argument matchers therefore the returned type is {@link MatchableInvocation}
* and not {@link Invocation}.
*
* @since 2.2.12
*/
MatchableInvocation getTarget();
}