Class org.as2lib.test.mock.support.ReplayState

org.as2lib.core.BasicClass
   +--org.as2lib.test.mock.support.ReplayState

Implemented Interfaces

MockControlState

Description

ReplayState replays behavior.

Method Index

new ReplayState()

getBehavior(), invokeMethod(), setArgumentsMatcher(), setMethodResponse(), verify()

Inherited from BasicClass

toString()

Constructor Detail

ReplayState

public function ReplayState(behavior:Behavior)

Constructs a new ReplayState instance.

Parameters

behaviorused to verify the expectations and to store actual method calls

Throws

IllegalArgumentExceptionif the passed-in behavior is null

Method Detail

getBehavior

public function getBehavior(Void):Behavior

Returns the behavior set during instantiation.

Return

the behavior

invokeMethod

public function invokeMethod(methodCall:MethodCall)

Registers the actual methodCall in the method behavior if it was expected or registers a new unexpected method call.

Return

the value returned by the method behaviour's response method

Throws

*the exception thrown by the method behaviour's response method

Specified By

invokeMethod() in org.as2lib.test.mock.MockControlState

verify

public function verify(Void):Void

Forwards the verification to the behavior of the mock.

Specified By

verify() in org.as2lib.test.mock.MockControlState

setMethodResponse

public function setMethodResponse(methodResponse:MethodResponse, methodCallRange:MethodCallRange):Void

setArgumentsMatcher

public function setArgumentsMatcher(argumentsMatcher:ArgumentsMatcher):Void