MethodCall
| Kind of class: | class |
|---|---|
| Inherits from: | BasicClass |
| Author: | Simon Wacker |
| Classpath: | org.as2lib.test.mock.MethodCall |
| File last modified: | Tuesday, 10 May 2005, 17:05:12 |
MethodCall stores all information available about a method call.Summary
Constructor
Instance methods
Instance methods inherited from BasicClass
Constructor
MethodCall
function MethodCall (
methodName:String,
args:Array)
Constructs a new
MethodCall instance.If args is null an empty array will be used instead.
Parameters:
methodName:
the name of the called method
args :
the arguments used for the method call
Instance methods
getArguments
function getArguments (
Void) : Array
Returns the arguments used for the method call.
Returns:
the arguments used for the method call
getArgumentsMatcher
function getArgumentsMatcher (
Void) : ArgumentsMatcher
Returns the currently used arguments matcher.
That is either the arguments matcher set via the
setArgumentsMatcher method or an instance of the default
org.as2lib.test.mock.support.DefaultArgumentsMatcher class.
Returns:
the currently used arguments matcher
getMethodName
function getMethodName (
Void) : String
Returns the name of the called method.
Returns:
the name of the called method
matches
function matches (
methodCall:MethodCall) : Boolean
Checks whether this method call matches the passed-in
methodCall.false will be returned if:
- The passed-in
methodCallisnull. - The method names do not match.
- The arguments do not match.
Parameters:
methodCall:
the method call to compare with this instance
setArgumentsMatcher
function setArgumentsMatcher (
argumentsMatcher:ArgumentsMatcher) : Void
Sets the new arguments matcher.
If argumentsMatcher is null the getArgumentsMatcher
method returns the default arguments matcher.
Parameters:
argumentsMatcher:
the new arguments matcher
toString
function toString (
) : String
Returns the string representation of this method call.
The returned string is constructed as follows:
theMethodName(theFirstArgument, ..)
Returns:
the string representation of this method call
Overrides: