labs.mock.MethodBinding_ Extends
Represents a binding between a method name, args and a stub.

Inheritance

Constructor

goog.labs.mock.MethodBinding_(methodNameargsstub)

Parameters

methodName : ?string
The name of the method being stubbed.
args : !Array
The arguments passed to the method.
stub : !Function
The stub function to be called for the given method.

Instance Methods

Public Protected Private
getMethodName() string
No description.
Returns: string  The method name for this binding.
code »
getStub() !Function
No description.
Returns: !Function  The stub to be executed.
code »
matches(methodNameargsisVerification) boolean
Determines whether the given args match the stored args_. Used to determine which stub to invoke for a method.
Arguments:
methodName : string
The name of the method being stubbed.
args : !Array
An array of arguments.
isVerification : boolean
Whether this is a function verification call or not.
Returns: boolean  If it matches the stored arguments.
code »
toString() string
No description.
Returns: string  A readable string representation of the binding as a method call.
code »

Instance Properties

args_ :
The arguments for the method being stubbed.
Code »
methodName_ :
The name of the method being stubbed.
Code »
stub_ :
The stub function.
Code »

Package labs.mock

Package Reference