Package org.mockito.internal.debugging
Class VerboseMockInvocationLogger
java.lang.Object
org.mockito.internal.debugging.VerboseMockInvocationLogger
- All Implemented Interfaces:
InvocationListener
Logs all invocations to standard output.
Used for debugging interactions with a mock.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
private void
printInvocation
(DescribedInvocation invocation) private void
printlnIndented
(String message) private void
printReturnedValueOrThrowable
(MethodInvocationReport methodInvocationReport) private void
printStubInfo
(MethodInvocationReport methodInvocationReport) void
reportInvocation
(MethodInvocationReport methodInvocationReport) Called after the invocation of the listener's mock if it returned normally.
-
Field Details
-
printStream
-
mockInvocationsCounter
private int mockInvocationsCounter
-
-
Constructor Details
-
VerboseMockInvocationLogger
public VerboseMockInvocationLogger() -
VerboseMockInvocationLogger
-
-
Method Details
-
reportInvocation
Description copied from interface:InvocationListener
Called after the invocation of the listener's mock if it returned normally.Exceptions caused by this invocationListener will raise a
MockitoException
.- Specified by:
reportInvocation
in interfaceInvocationListener
- Parameters:
methodInvocationReport
- Information about the method call that just happened.- See Also:
-
printReturnedValueOrThrowable
-
printStubInfo
-
printHeader
private void printHeader() -
printInvocation
-
printlnIndented
-