RecordState
| Kind of class: | class |
|---|---|
| Inherits from: | BasicClass |
| Implements: | |
| Author: | Simon Wacker |
| Classpath: | org.as2lib.test.mock.support.RecordState |
| File last modified: | Thursday, 05 May 2005, 17:04:12 |
RecordState records behaviors.Summary
Constructor
Instance methods
Instance methods inherited from BasicClass
Constructor
RecordState
function RecordState (
behavior:Behavior)
Constructs a new
RecordState instance.Parameters:
behavior:
the behavior to add and get behaviors of the mock
Throws:
Instance methods
getBehavior
function getBehavior (
Void) : Behavior
Returns the behavior set during instantiation.
Returns:
the behavior
invokeMethod
function invokeMethod (
methodCall:MethodCall)
Adds the expected
methodCall to the expected behavior of the mock.Parameters:
methodCall:
contains all information about the method call
setArgumentsMatcher
function setArgumentsMatcher (
argumentsMatcher:ArgumentsMatcher) : Void
Sets 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.
Parameters:
argumentsMatcher:
the new arguments matcher for the expected method call
Throws:
org.as2lib.env.except.IllegalArgumentException when in replay state
#setMethodResponse
function setMethodResponse (
methodResponse:MethodResponse,
methodCallRange:MethodCallRange) : Void
Sets 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.
number of times. When called between that range it responses the given way.
Parameters:
methodResponse :
the response of the method during the expected call
range
range
methodCallRange:
the expected range of method calls
Throws:
org.as2lib.env.except.IllegalArgumentException when in replay state
#verify
function verify (
Void) : Void