Class org.as2lib.test.mock.MethodCallRangeError

????
   +--Error
      +--org.as2lib.env.except.AbstractThrowable
         +--org.as2lib.env.except.FatalException
            +--org.as2lib.test.mock.AssertionFailedError
               +--org.as2lib.test.mock.MethodCallRangeError

Description

MethodCallRangeError is thrown if the expected method call range has not been met.

Method Index

new MethodCallRangeError()

addMethodCall(), doToString(), setType()

Inherited from FatalException

toString()

Inherited from AbstractThrowable

addStackTraceElement(), getCause(), getMessage(), getStackTrace(), getStringifier(), initCause(), setStringifier()

Constructor Detail

MethodCallRangeError

public function MethodCallRangeError(message:String, thrower, args:Array)

Constructs a new MethodCallRangeError instance.

All arguments are allowed to be null or undefined. But if one is, the string representation returned by the toString method will not be complete.

The args array should be the internal arguments array of the method that throws the throwable. The internal arguments array exists in every method and contains its parameters, the callee method and the caller method. You can refernce it in every method using the name "arguments".

Parameters

messagethe message that describes the problem in detail
throwerthe object that declares the method that throws this fatal exception
argsthe arguments of the throwing method

Method Detail

addMethodCall

public function addMethodCall(methodCall:MethodCall, expectedMethodCallRange:MethodCallRange, actualMethodCallRange:MethodCallRange):Void

Adds a new method call together with its expected and actual call range.

Parameters

methodCallthe new method call
expectedMethodCallRangethe expected method call range
actualMethodCallRangethe actual method call range

setType

public function setType(type:Function):Void

Sets the type of the mock that did not met all expectations.

Parameters

typethe type of the mock

doToString

public function doToString(Void):String

Returns the string representation of this error.

Return

the string representation of this error

Overrides

doToString() in org.as2lib.env.except.AbstractThrowable