Class org.as2lib.test.mock.MethodCallRange

Description

MethodCallRange represents the number of expected method calls.

Field Index

DEFAULT_MAXIMUM, DEFAULT_MINIMUM

Method Index

new MethodCallRange()
contains(), getMaximum(), getMinimum(), toString()

Constructor Detail

MethodCallRange

public function MethodCallRange()

Field Detail

DEFAULT_MINIMUM

static public DEFAULT_MINIMUM:Number
The minimum that is used if none has been specified.

DEFAULT_MAXIMUM

static public DEFAULT_MAXIMUM:Number
The maximum that is used if none has been specified.

Method Detail

getMinimum

public function getMinimum(Void):Number

Returns the minimum of this range.

Return

the set minimum

getMaximum

public function getMaximum(Void):Number

Returns the maximum of this range.

Return

the set maximum

contains

public function contains(quantity:Number):Boolean

Checks whether the passed-in quantity is between the minimum and maximum.

The quantity will be made positive if it is negative.

false will be returned if:

  • The passed-in quantity is null.
  • The passed-in quantity is smaller than the minimum.
  • The passed-in quantity is bigger than the maximum.

Parameters

quantitythe quantity

Return

true if the quantity is contained by this range else false

toString

public function toString():String

Returns the string representation of this range.

Return

the string representation of this range

Specified By

toString() in org.as2lib.core.BasicInterface

Overrides

toString() in org.as2lib.core.BasicClass