org.as2lib.core.BasicClass +--org.as2lib.test.mock.support.StateArgumentMatcher
ArgumentMatcher
StateArgumentMatcher
checks whether one argument is in an expected state.
public function StateArgumentMatcher(expectedType:Function)
Constructs a new StateArgumentMatcher
instance.
If every type is allowed, specifc Object
as expected type.
expectedType | the expected type of the argument |
IllegalArgumentException | if type is null or
undefined
|
public function addExpectedProperty(propertyName:String, propertyValue):Void
Adds a new property the argument is expected to have.
propertyName | the name of the expected property |
propertyValue | the value of the expected property |
public function matchArgument(argument):Boolean
Checks whether the passed-in argument
is in the expected state.
false
will be returned if:
argument
is null
or undefined
. argument
is not of the expected type. argument
is not in the expected state.argument | the argument to check whether it is in the expected state |
true
if the argument is in the expected state else false