|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockito.internal.invocation.InvocationImpl
public class InvocationImpl
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 | |
|---|---|
InvocationImpl(java.lang.Object mock,
MockitoMethod mockitoMethod,
java.lang.Object[] args,
int sequenceNumber,
RealMethod realMethod)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
callRealMethod()
calls real method |
boolean |
equals(java.lang.Object o)
|
java.lang.Object[] |
getArguments()
returns arguments passed to the method |
Location |
getLocation()
The place in the code where the invocation happened. |
java.lang.reflect.Method |
getMethod()
returns the method |
java.lang.Object |
getMock()
returns the mock object |
java.lang.Object[] |
getRawArguments()
Returns unprocessed arguments whereas InvocationOnMock.getArguments() returns
arguments already processed (e.g. |
int |
getSequenceNumber()
|
int |
hashCode()
|
void |
ignoreForVerification()
Configures this invocation to be ignored for verify-no-more-invocations or verification in order. |
boolean |
isIgnoredForVerification()
Informs if the invocation participates in verify-no-more-invocations or verification in order. |
boolean |
isVerified()
|
void |
markStubbed(StubInfo stubInfo)
Marks this invocation as stubbed. |
void |
markVerified()
Marks this invocation as verified so that it will not cause verification error at Mockito.verifyNoMoreInteractions(Object...) |
StubInfo |
stubInfo()
|
java.lang.String |
toString()
Describes the invocation in the human friendly way. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InvocationImpl(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 InvocationOnMockpublic java.lang.reflect.Method getMethod()
InvocationOnMock
getMethod in interface InvocationOnMockpublic java.lang.Object[] getArguments()
InvocationOnMock
getArguments in interface InvocationOnMockpublic boolean isVerified()
isVerified in interface VerificationAwareInvocationisVerified in interface InvocationMockito.verifyNoMoreInteractions(Object...)public int getSequenceNumber()
getSequenceNumber in interface Invocationpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
DescribedInvocation
toString in interface PrintableInvocationtoString in interface DescribedInvocationtoString in class java.lang.Objectpublic Location getLocation()
DescribedInvocation
getLocation in interface PrintableInvocationgetLocation in interface DescribedInvocationgetLocation in interface Invocationpublic java.lang.Object[] getRawArguments()
InvocationInvocationOnMock.getArguments() returns
arguments already processed (e.g. varargs expended, etc.).
getRawArguments in interface Invocation
public java.lang.Object callRealMethod()
throws java.lang.Throwable
InvocationOnMockWarning: depending on the real implementation it might throw exceptions
callRealMethod in interface InvocationOnMockjava.lang.Throwable - in case real method throwspublic void markVerified()
InvocationMockito.verifyNoMoreInteractions(Object...)
markVerified in interface Invocationpublic StubInfo stubInfo()
stubInfo in interface Invocationpublic void markStubbed(StubInfo stubInfo)
Invocation
markStubbed in interface InvocationstubInfo - the information about stubbing.public boolean isIgnoredForVerification()
Invocation
isIgnoredForVerification in interface Invocationpublic void ignoreForVerification()
InvocationInvocation.isIgnoredForVerification()
ignoreForVerification in interface Invocation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||