Package org.mockito.internal.debugging
Class VerboseMockInvocationLogger
- java.lang.Object
-
- org.mockito.internal.debugging.VerboseMockInvocationLogger
-
- All Implemented Interfaces:
InvocationListener
public class VerboseMockInvocationLogger extends java.lang.Object implements InvocationListener
Logs all invocations to standard output. Used for debugging interactions with a mock.
-
-
Field Summary
Fields Modifier and Type Field Description private int
mockInvocationsCounter
(package private) java.io.PrintStream
printStream
-
Constructor Summary
Constructors Constructor Description VerboseMockInvocationLogger()
VerboseMockInvocationLogger(java.io.PrintStream printStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
printFooter()
private void
printHeader()
private void
printInvocation(DescribedInvocation invocation)
private void
printlnIndented(java.lang.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.
-
-
-
Method Detail
-
reportInvocation
public void reportInvocation(MethodInvocationReport methodInvocationReport)
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:
MethodInvocationReport
-
printReturnedValueOrThrowable
private void printReturnedValueOrThrowable(MethodInvocationReport methodInvocationReport)
-
printStubInfo
private void printStubInfo(MethodInvocationReport methodInvocationReport)
-
printHeader
private void printHeader()
-
printInvocation
private void printInvocation(DescribedInvocation invocation)
-
printFooter
private void printFooter()
-
printlnIndented
private void printlnIndented(java.lang.String message)
-
-