Uses of Interface
org.mockito.invocation.Invocation
Packages that use Invocation
Package
Description
Mockito is a mock library for java - see
Mockito class for usage.Internal classes, not to be used by clients.
Whatever helps in debugging failed tests.
Invocation machinery and related classes.
JUnit integration support classes.
Deals with nicely printing verification errors.
Stubbing logic.
Answers for stubbed calls.
Static utils
Verification logic.
This package should be open to public once verification API is fully finished.
Verification checkers.
Public API related to mock method invocations.
Public classes relative to the listener APIs.
Stubbing related classes.
-
Uses of Invocation in org.mockito
Methods in org.mockito that return types with arguments of type InvocationModifier and TypeMethodDescriptionMockingDetails.getInvocations()All method invocations on this mock. -
Uses of Invocation in org.mockito.internal
Methods in org.mockito.internal that return InvocationMethods in org.mockito.internal with parameters of type InvocationModifier and TypeMethodDescriptionbooleanInOrderImpl.isVerified(Invocation i) voidInOrderImpl.markVerified(Invocation i) -
Uses of Invocation in org.mockito.internal.debugging
Fields in org.mockito.internal.debugging with type parameters of type InvocationMethods in org.mockito.internal.debugging with parameters of type InvocationModifier and TypeMethodDescriptionvoidFindingsListener.foundStubCalledWithDifferentArgs(Invocation unused, InvocationMatcher unstubbed) voidLoggingListener.foundStubCalledWithDifferentArgs(Invocation unused, InvocationMatcher unstubbed) voidFindingsListener.foundUnusedStub(Invocation unused) voidLoggingListener.foundUnusedStub(Invocation unused) Constructor parameters in org.mockito.internal.debugging with type arguments of type InvocationModifierConstructorDescriptionWarningsFinder(List<Invocation> unusedStubs, List<InvocationMatcher> allInvocations) WarningsPrinterImpl(List<Invocation> unusedStubs, List<InvocationMatcher> allInvocations, boolean warnAboutUnstubbed) -
Uses of Invocation in org.mockito.internal.exceptions
Methods in org.mockito.internal.exceptions with parameters of type InvocationModifier and TypeMethodDescriptionprivate static voidReporter.appendNotMatchingPositions(Invocation actualInvocation, MatchableInvocation matchableInvocation, StringBuilder messageBuilder) static AssertionErrorReporter.argumentsAreDifferent(Invocation actualInvocation, MatchableInvocation matchableInvocation, String wanted, List<String> actualCalls, List<Location> actualLocations) static MockitoAssertionErrorReporter.noMoreInteractionsWanted(Invocation undesired, List<VerificationAwareInvocation> invocations) static MockitoAssertionErrorReporter.noMoreInteractionsWantedInOrder(Invocation undesired) static voidReporter.potentialStubbingProblem(Invocation actualInvocation, Collection<Invocation> argMismatchStubbings) Method parameters in org.mockito.internal.exceptions with type arguments of type InvocationModifier and TypeMethodDescriptionprivate static StringReporter.createAllLocationsArgsMessage(List<Invocation> invocations) static UnnecessaryStubbingExceptionReporter.formatUnncessaryStubbingException(Class<?> testClass, Collection<Invocation> unnecessaryStubbings) static MockitoAssertionErrorReporter.neverWantedButInvoked(DescribedInvocation wanted, List<Invocation> invocations) static voidReporter.potentialStubbingProblem(Invocation actualInvocation, Collection<Invocation> argMismatchStubbings) static voidReporter.unncessaryStubbingException(List<Invocation> unused) -
Uses of Invocation in org.mockito.internal.handler
Fields in org.mockito.internal.handler declared as InvocationModifier and TypeFieldDescriptionprivate final InvocationNotifiedMethodInvocationReport.invocationMethods in org.mockito.internal.handler with parameters of type InvocationModifier and TypeMethodDescriptionInvocationNotifierHandler.handle(Invocation invocation) MockHandlerImpl.handle(Invocation invocation) NullResultGuardian.handle(Invocation invocation) private voidInvocationNotifierHandler.notifyMethodCall(Invocation invocation, Object returnValue) private voidInvocationNotifierHandler.notifyMethodCallException(Invocation invocation, Throwable exception) Constructors in org.mockito.internal.handler with parameters of type InvocationModifierConstructorDescriptionNotifiedMethodInvocationReport(Invocation invocation, Object returnedValue) Build a newMethodInvocationReportwith a return value.NotifiedMethodInvocationReport(Invocation invocation, Throwable throwable) Build a newMethodInvocationReportwith a return value. -
Uses of Invocation in org.mockito.internal.invocation
Classes in org.mockito.internal.invocation that implement InvocationClasses in org.mockito.internal.invocation that implement interfaces with type arguments of type InvocationModifier and TypeClassDescriptionclassCompares invocations based on the sequence numberFields in org.mockito.internal.invocation declared as InvocationModifier and TypeFieldDescriptionprivate final InvocationInvocationMatcher.invocationprivate final InvocationMatcherApplicationStrategy.invocationMethods in org.mockito.internal.invocation that return InvocationModifier and TypeMethodDescriptionDefaultInvocationFactory.createInvocation(Object target, MockCreationSettings settings, Method method, Callable realMethod, Object... args) private InvocationDefaultInvocationFactory.createInvocation(Object target, MockCreationSettings settings, Method method, RealMethod superMethod, Object[] args) DefaultInvocationFactory.createInvocation(Object target, MockCreationSettings settings, Method method, InvocationFactory.RealMethodBehavior realMethod, Object... args) static InvocationInvocationsFinder.findFirstMatchingUnverifiedInvocation(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext context) static InvocationInvocationsFinder.findFirstUnverified(List<Invocation> invocations) (package private) static InvocationInvocationsFinder.findFirstUnverified(List<Invocation> invocations, Object mock) static InvocationInvocationsFinder.findFirstUnverifiedInOrder(InOrderContext context, List<Invocation> orderedInvocations) i3 is unverified here: i1, i2, i3 v all good here: i1, i2, i3 v vstatic InvocationInvocationsFinder.findPreviousVerifiedInOrder(List<Invocation> invocations, InOrderContext context) static InvocationInvocationsFinder.findSimilarInvocation(List<Invocation> invocations, MatchableInvocation wanted) InvocationMatcher.getInvocation()Methods in org.mockito.internal.invocation that return types with arguments of type InvocationModifier and TypeMethodDescriptionstatic List<Invocation> InvocationsFinder.findAllMatchingUnverifiedChunks(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext orderingContext) static List<Invocation> InvocationsFinder.findInvocations(List<Invocation> invocations, MatchableInvocation wanted) static List<Invocation> InvocationsFinder.findMatchingChunk(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, InOrderContext context) some examples how it works: Given invocations sequence: 1,1,2,1 if wanted is 1 and mode is times(2) then returns 1,1 if wanted is 1 and mode is atLeast() then returns 1,1,1 if wanted is 1 and mode is times(x), where x != 2 then returns 1,1,1private static List<Invocation> InvocationsFinder.getFirstMatchingChunk(MatchableInvocation wanted, List<Invocation> unverified) private static List<Invocation> InvocationsFinder.removeVerifiedInOrder(List<Invocation> invocations, InOrderContext orderingContext) Methods in org.mockito.internal.invocation with parameters of type InvocationModifier and TypeMethodDescriptionprivate booleanInvocationMatcher.argumentsMatch(Invocation actual) MatchersBinder.bindMatchers(ArgumentMatcherStorage argumentMatcherStorage, Invocation invocation) voidInvocationMatcher.captureArgumentsFrom(Invocation invocation) intInvocationComparator.compare(Invocation o1, Invocation o2) static MatcherApplicationStrategyMatcherApplicationStrategy.getMatcherApplicationStrategyFor(Invocation invocation, List<? extends ArgumentMatcher<?>> matchers) Returns theMatcherApplicationStrategythat must be used to capture the arguments of the given invocation using the given matchers.booleanInvocationMatcher.hasSameMethod(Invocation candidate) booleanInvocationMatcher.hasSimilarMethod(Invocation candidate) similar means the same method name, same mock, unverified and: if arguments are the same cannot be overloadedstatic voidInvocationMarker.markVerified(Invocation invocation, MatchableInvocation wanted) booleanInvocationMatcher.matches(Invocation candidate) private voidMatchersBinder.validateMatchers(Invocation invocation, List<LocalizedMatcher> lastMatchers) Method parameters in org.mockito.internal.invocation with type arguments of type InvocationModifier and TypeMethodDescriptionstatic List<InvocationMatcher> InvocationMatcher.createFrom(List<Invocation> invocations) static List<Invocation> InvocationsFinder.findAllMatchingUnverifiedChunks(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext orderingContext) static InvocationInvocationsFinder.findFirstMatchingUnverifiedInvocation(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext context) static InvocationInvocationsFinder.findFirstUnverified(List<Invocation> invocations) (package private) static InvocationInvocationsFinder.findFirstUnverified(List<Invocation> invocations, Object mock) static InvocationInvocationsFinder.findFirstUnverifiedInOrder(InOrderContext context, List<Invocation> orderedInvocations) i3 is unverified here: i1, i2, i3 v all good here: i1, i2, i3 v vstatic List<Invocation> InvocationsFinder.findInvocations(List<Invocation> invocations, MatchableInvocation wanted) static List<Invocation> InvocationsFinder.findMatchingChunk(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, InOrderContext context) some examples how it works: Given invocations sequence: 1,1,2,1 if wanted is 1 and mode is times(2) then returns 1,1 if wanted is 1 and mode is atLeast() then returns 1,1,1 if wanted is 1 and mode is times(x), where x != 2 then returns 1,1,1static InvocationInvocationsFinder.findPreviousVerifiedInOrder(List<Invocation> invocations, InOrderContext context) static InvocationInvocationsFinder.findSimilarInvocation(List<Invocation> invocations, MatchableInvocation wanted) InvocationsFinder.getAllLocations(List<Invocation> invocations) private static List<Invocation> InvocationsFinder.getFirstMatchingChunk(MatchableInvocation wanted, List<Invocation> unverified) static LocationInvocationsFinder.getLastLocation(List<Invocation> invocations) static voidInvocationMarker.markVerified(List<Invocation> invocations, MatchableInvocation wanted) static voidInvocationMarker.markVerifiedInOrder(List<Invocation> chunk, MatchableInvocation wanted, InOrderContext context) private static List<Invocation> InvocationsFinder.removeVerifiedInOrder(List<Invocation> invocations, InOrderContext orderingContext) Constructors in org.mockito.internal.invocation with parameters of type InvocationModifierConstructorDescriptionInvocationMatcher(Invocation invocation) InvocationMatcher(Invocation invocation, List<ArgumentMatcher> matchers) privateMatcherApplicationStrategy(Invocation invocation, List<? extends ArgumentMatcher<?>> matchers) -
Uses of Invocation in org.mockito.internal.invocation.finder
Methods in org.mockito.internal.invocation.finder that return types with arguments of type InvocationModifier and TypeMethodDescriptionstatic List<Invocation> gets all invocations from mocks.static List<Invocation> -
Uses of Invocation in org.mockito.internal.junit
Fields in org.mockito.internal.junit with type parameters of type InvocationModifier and TypeFieldDescription(package private) final Map<Invocation, Set<Invocation>> StubbingArgMismatches.mismatches(package private) final Map<Invocation, Set<Invocation>> StubbingArgMismatches.mismatchesMethods in org.mockito.internal.junit that return types with arguments of type InvocationModifier and TypeMethodDescriptionUnusedStubbingsFinder.getUnusedStubbingsByLocation(Iterable<Object> mocks) Gets unused stubbings per location.private static List<Invocation> DefaultStubbingLookupListener.potentialArgMismatches(Invocation invocation, Collection<Stubbing> stubbings) Methods in org.mockito.internal.junit with parameters of type InvocationModifier and TypeMethodDescriptionvoidStubbingArgMismatches.add(Invocation invocation, Invocation stubbing) private static List<Invocation> DefaultStubbingLookupListener.potentialArgMismatches(Invocation invocation, Collection<Stubbing> stubbings) -
Uses of Invocation in org.mockito.internal.listeners
Fields in org.mockito.internal.listeners declared as InvocationModifier and TypeFieldDescriptionprivate final InvocationStubbingLookupNotifier.Event.invocationMethods in org.mockito.internal.listeners that return InvocationMethods in org.mockito.internal.listeners with parameters of type InvocationModifier and TypeMethodDescriptionstatic voidStubbingLookupNotifier.notifyStubbedAnswerLookup(Invocation invocation, Stubbing stubbingFound, Collection<Stubbing> allStubbings, CreationSettings creationSettings) Constructors in org.mockito.internal.listeners with parameters of type InvocationModifierConstructorDescriptionEvent(Invocation invocation, Stubbing stubbing, Collection<Stubbing> allStubbings, MockCreationSettings mockSettings) -
Uses of Invocation in org.mockito.internal.reporting
Methods in org.mockito.internal.reporting with parameters of type InvocationModifier and TypeMethodDescriptionPrintSettings.print(List<ArgumentMatcher> matchers, Invocation invocation) PrintSettings.print(Invocation invocation) Method parameters in org.mockito.internal.reporting with type arguments of type InvocationModifier and TypeMethodDescriptionprivate static booleanSmartPrinter.isMultiLine(MatchableInvocation wanted, List<Invocation> allActualInvocations) Constructors in org.mockito.internal.reporting with parameters of type InvocationModifierConstructorDescriptionSmartPrinter(MatchableInvocation wanted, Invocation actual, Integer... indexesOfMatchersToBeDescribedWithExtraTypeInfo) Constructor parameters in org.mockito.internal.reporting with type arguments of type InvocationModifierConstructorDescriptionSmartPrinter(MatchableInvocation wanted, List<Invocation> allActualInvocations, Integer[] indexesOfMatchersToBeDescribedWithExtraTypeInfo, Set<String> classNamesToBeDescribedWithFullName) -
Uses of Invocation in org.mockito.internal.stubbing
Methods in org.mockito.internal.stubbing that return types with arguments of type InvocationModifier and TypeMethodDescriptionInvocationContainerImpl.getInvocations()OngoingStubbingImpl.getRegisteredInvocations()Methods in org.mockito.internal.stubbing with parameters of type InvocationModifier and TypeMethodDescription(package private) ObjectInvocationContainerImpl.answerTo(Invocation invocation) InvocationContainerImpl.findAnswerFor(Invocation invocation) -
Uses of Invocation in org.mockito.internal.stubbing.answers
Methods in org.mockito.internal.stubbing.answers with parameters of type InvocationModifier and TypeMethodDescriptionprivate Class<?> ReturnsArgumentAt.inferArgumentType(Invocation invocation, int argumentIndex) private voidReturnsArgumentAt.validateArgumentTypeCompatibility(Invocation invocation, int argumentPosition) -
Uses of Invocation in org.mockito.internal.util
Methods in org.mockito.internal.util that return types with arguments of type Invocation -
Uses of Invocation in org.mockito.internal.verification
Fields in org.mockito.internal.verification declared as InvocationFields in org.mockito.internal.verification with type parameters of type InvocationModifier and TypeFieldDescriptionprivate final LinkedList<Invocation> DefaultRegisteredInvocations.invocationsMethods in org.mockito.internal.verification that return types with arguments of type InvocationModifier and TypeMethodDescriptionDefaultRegisteredInvocations.getAll()RegisteredInvocations.getAll()SingleRegisteredInvocation.getAll()VerificationDataImpl.getAllInvocations()Methods in org.mockito.internal.verification with parameters of type InvocationModifier and TypeMethodDescriptionvoidDefaultRegisteredInvocations.add(Invocation invocation) voidRegisteredInvocations.add(Invocation invocation) voidSingleRegisteredInvocation.add(Invocation invocation) booleanInOrderContextImpl.isVerified(Invocation invocation) voidInOrderContextImpl.markVerified(Invocation i) Method parameters in org.mockito.internal.verification with type arguments of type InvocationModifier and TypeMethodDescriptionprivate voidAtMost.removeAlreadyVerified(List<Invocation> invocations) -
Uses of Invocation in org.mockito.internal.verification.api
Fields in org.mockito.internal.verification.api with type parameters of type InvocationModifier and TypeFieldDescriptionprivate final List<Invocation> VerificationDataInOrderImpl.allInvocationsMethods in org.mockito.internal.verification.api that return types with arguments of type InvocationModifier and TypeMethodDescriptionVerificationData.getAllInvocations()All invocations recorded on the mock object that is being verified.VerificationDataInOrder.getAllInvocations()VerificationDataInOrderImpl.getAllInvocations()Methods in org.mockito.internal.verification.api with parameters of type InvocationModifier and TypeMethodDescriptionbooleanInOrderContext.isVerified(Invocation invocation) voidInOrderContext.markVerified(Invocation i) Constructor parameters in org.mockito.internal.verification.api with type arguments of type InvocationModifierConstructorDescriptionVerificationDataInOrderImpl(InOrderContext inOrder, List<Invocation> allInvocations, MatchableInvocation wanted) -
Uses of Invocation in org.mockito.internal.verification.checkers
Method parameters in org.mockito.internal.verification.checkers with type arguments of type InvocationModifier and TypeMethodDescriptionstatic voidAtLeastXNumberOfInvocationsChecker.checkAtLeastNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount) static voidAtLeastXNumberOfInvocationsChecker.checkAtLeastNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, InOrderContext orderingContext) static voidMissingInvocationChecker.checkMissingInvocation(List<Invocation> invocations, MatchableInvocation wanted) static voidMissingInvocationChecker.checkMissingInvocation(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext context) static voidNumberOfInvocationsChecker.checkNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount) static voidNumberOfInvocationsChecker.checkNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, InOrderContext context) static voidNumberOfInvocationsChecker.checkNumberOfInvocationsNonGreedy(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, InOrderContext context) -
Uses of Invocation in org.mockito.invocation
Methods in org.mockito.invocation that return InvocationModifier and TypeMethodDescriptionInvocationFactory.createInvocation(Object target, MockCreationSettings settings, Method method, InvocationFactory.RealMethodBehavior realMethod, Object... args) Creates instance of anInvocationobject.MatchableInvocation.getInvocation()The actual invocation Mockito will match against.Methods in org.mockito.invocation with parameters of type InvocationModifier and TypeMethodDescriptionvoidMatchableInvocation.captureArgumentsFrom(Invocation invocation) This method is used by Mockito to implement argument captor functionality (seeArgumentCaptor.MockHandler.handle(Invocation invocation) Takes an invocation object and handles it.booleanMatchableInvocation.hasSameMethod(Invocation candidate) Returns true if the candidate invocation has the same method (method name and parameter types)booleanMatchableInvocation.hasSimilarMethod(Invocation candidate) Candidate invocation has the similar method.booleanMatchableInvocation.matches(Invocation candidate) Same method, mock and all arguments match. -
Uses of Invocation in org.mockito.listeners
Methods in org.mockito.listeners that return Invocation -
Uses of Invocation in org.mockito.stubbing
Methods in org.mockito.stubbing that return InvocationModifier and TypeMethodDescriptionStubbing.getInvocation()Returns the method invocation that is stubbed.