Interface org.as2lib.test.mock.Behavior

org.as2lib.core.BasicInterface
   +--org.as2lib.test.mock.Behavior

Description

Behavior stores expected behaviors and exposes them for verification.

Method Index

addMethodBehavior(), createMethodBehavior(), getLastMethodBehavior(), getMethodBehavior(), removeAllBehaviors(), verify()

Inherited from BasicInterface

toString()

Method Detail

addMethodBehavior

public function addMethodBehavior(methodName:String, methodBehavior:MethodBehavior):Void

Adds the given methodBehavior behavior for the passed-in methodName.

Parameters

methodNamethe name of the method to register the methodBehavior with
methodBehaviorthe method behavior to register

createMethodBehavior

public function createMethodBehavior(expectedMethodCall:MethodCall):MethodBehavior

Creates a new method behavior for the passed-in expectedMethodCall.

Parameters

expectedMethodCallthe method call to create a behavior for

Return

the created method behavior

getMethodBehavior

public function getMethodBehavior(actualMethodCall:MethodCall):MethodBehavior

Returns a method behavior that matches the given actualMethodCall.

Return

a matching method behavior

getLastMethodBehavior

public function getLastMethodBehavior(Void):MethodBehavior

Returns the lastly added method behavior.

Return

the lastly added method behavior

removeAllBehaviors

public function removeAllBehaviors(Void):Void

Removes all added behaviors.

verify

public function verify(Void):Void

Verifies all added behaviors.