TypeArgumentsMatcher
| Kind of class: | class |
|---|---|
| Inherits from: | BasicClass |
| Implements: | |
| Author: | Simon Wacker |
| Classpath: | org.as2lib.test.mock.support.TypeArgumentsMatcher |
| File last modified: | Sunday, 29 May 2005, 11:48:54 |
TypeArgumentsMatcher matches the actual arguments agains a list of types.Summary
Constructor
Constructor
TypeArgumentsMatcher
function TypeArgumentsMatcher (
expectedTypes:Array)
Constructs a new
TypeArgumentsMatcher instance.If a type in the expectedType array is null or
undefined the expected and actual argument will be compared.
If an element in the expectedType array is an instance of type
org.as2lib.test.mock.ArgumentMatcher, this argument matcher will be used to check whether
the actual argument is correct.
Parameters:
expectedTypes:
the expected types of the arguments
Instance methods
matchArguments
function matchArguments (
expectedArguments:Array,
actualArguments:Array) : Boolean
Compares the actual arguments only by type against the expected types given on
contruction.
contruction.
If a type of the expected types is null or undefined the
expected and actual argument will be compared directly with the strict equals
operator.
false will be returned if:
- The lengths of the expected and actual arguments differ.
- The lengths of the expected types and the actual arguments differ.
- Any actual argument is not of the expected type.