Access keys

ReplayState

Kind of class: class
Inherits from: BasicClass
Implements:
Author: Simon Wacker
Classpath: org.as2lib.test.mock.support.ReplayState
File last modified: Sunday, 10 April 2005, 11:54:06
ReplayState replays behavior.

Summary

Constructor
Instance methods
Instance methods inherited from BasicClass

Constructor

ReplayState

function ReplayState (
behavior:Behavior)
Constructs a new ReplayState instance.
Parameters:
behavior:
used to verify the expectations and to store actual method
calls
Throws:
org.as2lib.env.except.IllegalArgumentException if the passed-in behavior is
null

Instance methods

getBehavior

function getBehavior (
Void) : Behavior
Returns the behavior set during instantiation.
Returns:
the behavior

invokeMethod

function invokeMethod (
methodCall:MethodCall)
Registers the actual methodCall in the method behavior if it was
expected or registers a new unexpected method call.
Returns:
the value returned by the method behaviour's response method
Throws:
the exception thrown by the method behaviour's response method

setArgumentsMatcher

function setArgumentsMatcher (
argumentsMatcher:ArgumentsMatcher) : Void
Parameters:
argumentsMatcher:
the arguments matcher to use for the specific method
#

setMethodResponse

function setMethodResponse (
methodResponse:MethodResponse, methodCallRange:MethodCallRange) : Void
Parameters:
methodResponse :
handles incoming requests appropriately
#
methodCallRange:
stores the minimum and maximum quantity of method calls
#

verify

function verify (
Void) : Void
Forwards the verification to the behavior of the mock.
Throws:
org.as2lib.test.mock.AssertionFailedError if any expectation has not
been met in replay state
#
#