|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.virtualmock.call.Call
org.virtualmock.call.RecordedCall
Represents a method invocation of a recorded mock call. This is a subclass of Call which only contains information which is specific to recorded calls.
| Constructor Summary | |
RecordedCall(Signature signature)
Creates a new RecordedCall object. |
|
RecordedCall(Signature signature,
java.lang.Object[] argValues)
Creates a new RecordedCall object. |
|
RecordedCall(Signature signature,
java.lang.Object[] argValues,
java.lang.Object returnValue)
Creates a new RecordedCall object which has a return value. |
|
RecordedCall(Signature signature,
java.lang.Object[] argValues,
java.lang.Throwable throwable)
Creates a new RecordedCall object which throws an exception. |
|
| Method Summary | |
ArgMatcher[] |
getArgMatchers()
Gets the ArgMatchers that are defined for this call (if any). |
int |
getInvocationCount()
Returns the number of times incrementInvocationCount() has been called on this Call. |
boolean |
hasMatchingArgs(Call call)
Performs matching of all arguments on this Call to the specified Call, based on the ArgMatchers that are defined for this call. |
boolean |
hasUnlimitedInvocations()
Return true if this call has unlimited invocations set. |
void |
incrementInvocationCount()
Increments the internal invocation count for this call by one. |
boolean |
isInvocable()
Indicates if this call is invocable. |
boolean |
isInvoked()
Returns true if invocation count is greater than zero. |
boolean |
matches(Call call)
Returns true if hasMatchingSignature() and hasMatchingArgs() both return true. |
void |
setArgMatchers(ArgMatcher[] argMatchers)
Sets the ArgMatchers that are defined for this call. |
void |
setUnlimitedInvocations(boolean unlimitedInvocations)
Set that this call can be invoked an unlimited number of times. |
| Methods inherited from class org.virtualmock.call.Call |
getArgTypes, getArgValues, getCallId, getClassName, getMethodName, getReturnType, getReturnValue, getSignature, getSignatureSequence, getThrowable, hasArguments, hasMatchingSignature, hasMatchingSignature, hasReturnValue, isReturnTypePrimitive, setReturnValue, setSignatureSequence, setThrowable, toString, validateArguments, validateReturnValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RecordedCall(Signature signature,
java.lang.Object[] argValues)
signature - the unique identifier for the callargValues - an array representing the values of the arguments
passed to (or expected by) the call.public RecordedCall(Signature signature)
signature - the unique identifier for the call
public RecordedCall(Signature signature,
java.lang.Object[] argValues,
java.lang.Object returnValue)
signature - the method signature for the callargValues - an array representing the values of the arguments
passed to (or expected by) the call.returnValue - the value the call will return
public RecordedCall(Signature signature,
java.lang.Object[] argValues,
java.lang.Throwable throwable)
signature - the method signature for the callargValues - an array representing the values of the arguments
passed to (or expected by) the call.throwable - the exception the call will throw| Method Detail |
public void setArgMatchers(ArgMatcher[] argMatchers)
argMatchers - the array of ArgMatchers to use for this call
java.lang.IllegalArgumentException - if the number of ArgTypes does not
match the number of ArgMatcherspublic ArgMatcher[] getArgMatchers()
public boolean isInvocable()
public int getInvocationCount()
public boolean isInvoked()
public void setUnlimitedInvocations(boolean unlimitedInvocations)
unlimitedInvocations - boolean flag.public boolean hasMatchingArgs(Call call)
Performs matching of all arguments on this Call to the specified Call, based on the ArgMatchers that are defined for this call. For ArgMatchers where the order is relevant (such as GreaterThanMatcher), it is important to know that the Call is matched TO the Call. In other words, Call GreaterThan Call is checked to see if the match is true.
Note that all matching is done based on position. This means that that all arguments and matchers must be in the same corresponding order on this Call, the Call which was passed, and the ArgMatchers for this Call.
call - The Call which will be matched to this Call
java.lang.IllegalArgumentException - if the signatures of the calls do not
matchpublic boolean hasUnlimitedInvocations()
public void incrementInvocationCount()
public boolean matches(Call call)
call - Call to match against
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||