Interface VerificationData

All Known Implementing Classes:
VerificationDataImpl

public interface VerificationData
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.
  • Method Details

    • getAllInvocations

      List<Invocation> getAllInvocations()
      All invocations recorded on the mock object that is being verified. Does not include invocations recorded on other mock objects.
    • getTarget

      MatchableInvocation getTarget()
      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 MatchableInvocation and not Invocation.
      Since:
      2.2.12
    • getWanted

      Deprecated.
      - This internal method leaks internal class InvocationMatcher. Please use getTarget() instead. Deprecated since 2.2.12