# Class goog.testing.mockmatchers.SaveArgument

code »

    goog.testing.mockmatchers.ArgumentMatcher
      └ 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.

## Constructor

goog.testing.mockmatchers.SaveArgument ( opt_matcher, opt_matchName )

Parameters
opt_matcher: `(goog.testing.mockmatchers.ArgumentMatcher|Function)=` Argument matcher or matching function that will be used to validate the argument. By default, argument will always be valid. opt_matchName: `?string=` The name expressing intent as part of an error message for when a match fails.

Show:Public Protected Private

## Instance Methods

### Defined in `goog.testing.mockmatchers.SaveArgument`

code »matches ( toVerify, opt_expectation ) ⇒ `boolean`

Parameters
toVerify opt_expectation

## Instance Properties

### Defined in `goog.testing.mockmatchers.SaveArgument`

code »arg : `*`

Saved argument that was verified.

code »delegateMatcher_ : `goog.testing.mockmatchers.ArgumentMatcher`

Delegate match requests to this matcher.

### Defined in `goog.testing.mockmatchers.ArgumentMatcher`

code »matchFn_ : `Function`

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

code »matchName_ : `?string`

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

## Static Properties

code »goog.testing.mockmatchers.SaveArgument.superClass_ : `goog.testing.mockmatchers.ArgumentMatcher.prototype`