mockmatchers.js
No description.

File Location

/goog/testing/mockmatchers.js

Classes

goog.testing.mockmatchers.ArgumentMatcher
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.
goog.testing.mockmatchers.IgnoreArgument
A matcher that always returns true. It is useful when the user does not care for some arguments. For example: mockFunction('username', 'password', IgnoreArgument);
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. For example, if the argument is a callback method, the unit test can then later call this callback to test the asynchronous portion of the call.
goog.testing.mockmatchers.TypeOf
A matcher that verifies that an argument is of a given type (e.g. "object").

Public Protected Private

Global Functions

goog.testing.mockmatchers.flexibleArrayMatcher(expectedArrarropt_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.
Arguments:
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: boolean  Whether or not the given array matches the expectations.
code »

Global Variables

function%64 :
No description.
Code »
function%65 :
No description.
Code »
function%66 :
No description.
Code »
function%67 :
No description.
Code »
function%68 :
No description.
Code »
function%69 :
No description.
Code »
function%70 :
No description.
Code »
function%71 :
No description.
Code »
function%72 :
No description.
Code »
function%73 :
No description.
Code »
function%74 :
No description.
Code »

Directory testing

File Reference