|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mockito.internal.invocation.Invocation
public class Invocation
Method call on a mock object.
Contains sequence number which should be globally unique and is used for verification in order.
Contains stack trace of invocation
Constructor Summary | |
---|---|
Invocation(java.lang.Object mock,
MockitoMethod mockitoMethod,
java.lang.Object[] args,
int sequenceNumber,
RealMethod realMethod)
|
Method Summary | |
---|---|
protected java.util.List<org.hamcrest.Matcher> |
argumentsToMatchers()
|
java.lang.Object |
callRealMethod()
calls real method |
boolean |
equals(java.lang.Object o)
|
java.lang.Object[] |
getArguments()
returns arguments passed to the method |
int |
getArgumentsCount()
|
Location |
getLocation()
|
java.lang.reflect.Method |
getMethod()
returns the method |
java.lang.String |
getMethodName()
|
java.lang.Object |
getMock()
returns the mock object |
java.lang.Object[] |
getRawArguments()
|
java.lang.Integer |
getSequenceNumber()
|
int |
hashCode()
|
void |
ignoreForVerification()
|
boolean |
isDeclaredOnInterface()
|
boolean |
isIgnoredForVerification()
|
boolean |
isToString()
|
boolean |
isValidException(java.lang.Throwable throwable)
|
boolean |
isValidReturnType(java.lang.Class clazz)
|
boolean |
isVerified()
|
boolean |
isVoid()
|
void |
markStubbed(StubInfo stubInfo)
|
java.lang.String |
printMethodReturnType()
|
boolean |
returnsPrimitive()
|
StubInfo |
stubInfo()
|
java.lang.String |
toString()
|
protected java.lang.String |
toString(java.util.List<org.hamcrest.Matcher> matchers,
PrintSettings printSettings)
|
java.lang.String |
toString(PrintSettings printSettings)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Invocation(java.lang.Object mock, MockitoMethod mockitoMethod, java.lang.Object[] args, int sequenceNumber, RealMethod realMethod)
Method Detail |
---|
public java.lang.Object getMock()
InvocationOnMock
getMock
in interface InvocationOnMock
public java.lang.reflect.Method getMethod()
InvocationOnMock
getMethod
in interface InvocationOnMock
public java.lang.Object[] getArguments()
InvocationOnMock
getArguments
in interface InvocationOnMock
public boolean isVerified()
isVerified
in interface VerificationAwareInvocation
public java.lang.Integer getSequenceNumber()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in interface PrintableInvocation
toString
in class java.lang.Object
protected java.lang.String toString(java.util.List<org.hamcrest.Matcher> matchers, PrintSettings printSettings)
protected java.util.List<org.hamcrest.Matcher> argumentsToMatchers()
public boolean isToString()
public boolean isValidException(java.lang.Throwable throwable)
public boolean isValidReturnType(java.lang.Class clazz)
public boolean isVoid()
public java.lang.String printMethodReturnType()
public java.lang.String getMethodName()
public boolean returnsPrimitive()
public Location getLocation()
getLocation
in interface PrintableInvocation
public int getArgumentsCount()
public java.lang.Object[] getRawArguments()
public java.lang.Object callRealMethod() throws java.lang.Throwable
InvocationOnMock
Warning: depending on the real implementation it might throw exceptions
callRealMethod
in interface InvocationOnMock
java.lang.Throwable
- in case real method throwspublic boolean isDeclaredOnInterface()
public java.lang.String toString(PrintSettings printSettings)
toString
in interface PrintingFriendlyInvocation
public StubInfo stubInfo()
public void markStubbed(StubInfo stubInfo)
public boolean isIgnoredForVerification()
public void ignoreForVerification()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |