Namespace goog.testing.mockmatchers

code »

Classes

goog.testing.mockmatchers.ArgumentMatcher
A simple interface for executing argument matching.
goog.testing.mockmatchers.IgnoreArgument
A matcher that always returns true.
goog.testing.mockmatchers.InstanceOf
A matcher that verifies that an argument is an instance of a given class.
goog.testing.mockmatchers.ObjectEquals
A matcher that verifies that the argument is an object that equals the given expected object, using a deep comparison.
goog.testing.mockmatchers.RegexpMatch
A matcher that verifies that an argument matches a given RegExp.
goog.testing.mockmatchers.SaveArgument
A matcher that saves the argument that it is verifying so that your unit test can perform extra tests with this argument later.
goog.testing.mockmatchers.TypeOf
A matcher that verifies that an argument is of a given type (e.g.
Show:

Global Functions

code »goog.testing.mockmatchers.flexibleArrayMatcher ( expectedArr, arr, opt_expectation )boolean

A function that checks to see if an array matches a given set of expectations. The expectations array can be a mix of ArgumentMatcher implementations and values. True will be returned if values are identical or if a matcher returns a positive result.

Parameters
expectedArr: Array
An array of expectations which can be either values to check for equality or ArgumentMatchers.
arr: Array
The array to match.
opt_expectation: ?goog.testing.MockExpectation=
The expectation for this match.
Returns
Whether or not the given array matches the expectations.

Global Properties

An instance of the IgnoreArgument matcher. Returns true for all matches.

A matcher that verifies that an argument is an array.

A matcher that verifies that an argument is a array-like. A NodeList is an example of a collection that is very close to an array.

A matcher that verifies that an argument is a boolean.

A matcher that verifies that an argument is a date-like.

A matcher that verifies that an argument is a function.

A matcher that verifies that an argument is like a DOM node.

A matcher that verifies that an argument is a number.

A matcher that verifies that an argument is an object.

A matcher that verifies that an argument is a string.