Class goog.testing.mockmatchers.InstanceOf

code »
goog.testing.mockmatchers.ArgumentMatcher
  └ goog.testing.mockmatchers.InstanceOf

A matcher that verifies that an argument is an instance of a given class.

Constructor

goog.testing.mockmatchers.InstanceOf ( ctor )
Parameters
ctor: Function
The class that will be used for verification.
Show:

Instance Methods

code »matches ( toVerify, opt_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.

Parameters
toVerify: *
The argument that should be verified.
opt_expectation: ?goog.testing.MockExpectation=
The expectation for this match.
Returns
Whether or not a given argument passes verification.

Instance Properties

A function that evaluates a given argument and returns true if it meets a given criteria.

A string indicating the match intent (e.g. isBoolean or isString).

Static Properties