labs.mock.StubBinder_ Extends
The stub binder is the object that helps define the stubs by binding method name to the stub method.

Inheritance

Constructor

goog.labs.mock.StubBinder_(mockManagernameargs)

Parameters

mockManager : !goog.labs.mock.MockManager_
The mock manager.
name : ?string
The method name.
args : !Array
The other arguments to the method.

Instance Methods

Public Protected Private
then(func)
Defines the stub to be called for the method name and arguments bound earlier. TODO(user): Add support for the 'Answer' interface.
Arguments:
func : !Function
The stub.
code »
thenReturn(value)
Defines the stub to return a specific value for a method name and arguments.
Arguments:
value : *
The value to return.
code »

Instance Properties

args_ :
Holds the arguments for the method.
Code »
The mock manager instance.
Code »
name_ :
Holds the name of the method to be bound.
Code »

Package labs.mock

Package Reference