MockControlState
RecordState records behaviors.
new RecordState()public function RecordState(behavior:Behavior)
Constructs a new RecordState instance.
behavior | the behavior to add and get behaviors of the mock |
| IllegalArgumentException | if the passed-in behavior is
null
|
public function getBehavior(Void):BehaviorReturns the behavior set during instantiation.
the behavior
public function invokeMethod(methodCall:MethodCall)
Adds the expected methodCall to the expected behavior of the mock.
methodCall | contains all information about the method call |
public function setMethodResponse(methodResponse:MethodResponse, methodCallRange:MethodCallRange):VoidSets the expectation that the lastly called method is called the passed-in number of times. When called between that range it responses the given way.
methodResponse | the response of the method during the expected call range |
methodCallRange | the expected range of method calls |
setMethodResponse() in org.as2lib.test.mock.MockControlState
public function setArgumentsMatcher(argumentsMatcher:ArgumentsMatcher):VoidSets the arguments matcher for the lastly called method.
The arguments matcher is used by the expected method call to check whether it matches an actual method call.
argumentsMatcher | the new arguments matcher for the expected method call |
setArgumentsMatcher() in org.as2lib.test.mock.MockControlState