undefined
, though stubs can be later defined using
goog.labs.mock.when
.
undefined
, though stubs can be
later defined using goog.labs.mock.when
.
Returns a nicely formatted, readble representation of a method call.
|
code » | |||
This is just another implementation of goog.debug.deepExpose with a more
compact format.
Arguments:
Returns: string
The string representation of the object.
|
code » | |||
Returns a name to identify a function. Named functions return their names,
unnamed functions return a string of the form '#anonymous{ID}' where ID is
a unique identifier for each anonymous function.
|
code » | |||
A unique Id generator that does not modify the object.
Arguments:
Returns: number
an unique id for the object.
|
code » | |||
Mocks a given object or class.
|
code » | |||
Mocks a given function.
|
code » | |||
Spies on a given object.
|
code » | |||
Returns an object that can be used to verify calls to specific methods of a
given mock.
|
code » | |||
Facilitates (and is the first step in) setting up stubs. Obtains an object
on which, the method to be mocked is called to create a stub. Sample usage:
var mockObj = goog.labs.mock.mock(objectBeingMocked);
goog.labs.mock.when(mockObj).getFoo(3).thenReturn(4);
Arguments:
Returns: !goog.labs.mock.StubBinder_
The property binder.
|
code » |