Package org.mockito.internal.handler
Class NotifiedMethodInvocationReport
- java.lang.Object
-
- org.mockito.internal.handler.NotifiedMethodInvocationReport
-
- All Implemented Interfaces:
MethodInvocationReport
public class NotifiedMethodInvocationReport extends java.lang.Object implements MethodInvocationReport
Report on a method call
-
-
Field Summary
Fields Modifier and Type Field Description private Invocation
invocation
private java.lang.Object
returnedValue
private java.lang.Throwable
throwable
-
Constructor Summary
Constructors Constructor Description NotifiedMethodInvocationReport(Invocation invocation, java.lang.Object returnedValue)
Build a newMethodInvocationReport
with a return value.NotifiedMethodInvocationReport(Invocation invocation, java.lang.Throwable throwable)
Build a newMethodInvocationReport
with a return value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
DescribedInvocation
getInvocation()
java.lang.String
getLocationOfStubbing()
java.lang.Object
getReturnedValue()
java.lang.Throwable
getThrowable()
int
hashCode()
boolean
threwException()
-
-
-
Field Detail
-
invocation
private final Invocation invocation
-
returnedValue
private final java.lang.Object returnedValue
-
throwable
private final java.lang.Throwable throwable
-
-
Constructor Detail
-
NotifiedMethodInvocationReport
public NotifiedMethodInvocationReport(Invocation invocation, java.lang.Object returnedValue)
Build a newMethodInvocationReport
with a return value.- Parameters:
invocation
- Information on the method callreturnedValue
- The value returned by the method invocation
-
NotifiedMethodInvocationReport
public NotifiedMethodInvocationReport(Invocation invocation, java.lang.Throwable throwable)
Build a newMethodInvocationReport
with a return value.- Parameters:
invocation
- Information on the method callthrowable
- Tha throwable raised by the method invocation
-
-
Method Detail
-
getInvocation
public DescribedInvocation getInvocation()
- Specified by:
getInvocation
in interfaceMethodInvocationReport
- Returns:
- Information on the method call, never
null
-
getReturnedValue
public java.lang.Object getReturnedValue()
- Specified by:
getReturnedValue
in interfaceMethodInvocationReport
- Returns:
- The resulting value of the method invocation, may be
null
-
getThrowable
public java.lang.Throwable getThrowable()
- Specified by:
getThrowable
in interfaceMethodInvocationReport
- Returns:
- The throwable raised by the method invocation, maybe
null
-
threwException
public boolean threwException()
- Specified by:
threwException
in interfaceMethodInvocationReport
- Returns:
true
if an exception was raised,false
otherwise
-
getLocationOfStubbing
public java.lang.String getLocationOfStubbing()
- Specified by:
getLocationOfStubbing
in interfaceMethodInvocationReport
- Returns:
- Location of the stub invocation
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-