testing.mockmatchers.ArgumentMatcher Extends
A simple interface for executing argument matching. A match in this case is testing to see if a supplied object fits a given criteria. True is returned if the given criteria is met.

Inheritance

Constructor

goog.testing.mockmatchers.ArgumentMatcher(opt_matchFnopt_matchName)

Parameters

opt_matchFn : Function=
A function that evaluates a given argument and returns true if it meets a given criteria.
opt_matchName : ?string=
The name expressing intent as part of an error message for when a match fails.

Instance Methods

Public Protected Private
matches(toVerifyopt_expectation) boolean
A function that takes a match argument and an optional MockExpectation which (if provided) will get error information and returns whether or not it matches.
Arguments:
toVerify : *
The argument that should be verified.
opt_expectation : goog.testing.MockExpectation?=
The expectation for this match.
Returns: boolean  Whether or not a given argument passes verification.
code »

Instance Properties

matchFn_ :
No description.
Code »
matchName_ :
No description.
Code »

Package testing.mockmatchers

Package Reference