goog.testing.MockClassFactory |
Returns whether or not a given class has been mocked.
|
code » | |||||
Create a proxy class. A proxy will pass functions to the mock for a class.
The proxy class only covers prototype methods. A static mock is not build
simultaneously since it might be strict or loose. The proxy class inherits
from the target class in order to preserve instanceof checks.
|
code » | |||||
![]()
Creates either a loose or strict mock for the static functions of a given
class.
Arguments:
Returns: !goog.testing.StrictMock | !goog.testing.LooseMock
The mock created
for the static functions of the provided class.
|
code » | |||||
Find a mock instance for a given class name and argument list.
Returns: goog.testing.StrictMock | goog.testing.LooseMock
The mock found for
the given argument list.
|
code » | |||||
Iterates through a namespace to find the name of a given class. This is done
solely to support compilation since string identifiers would break down.
Tests usually aren't compiled, but the functionality is supported.
|
code » | |||||
Gets a loose mock for a given class.
Arguments:
Returns: goog.testing.LooseMock
The mock created for the provided class.
|
code » | |||||
Gets a loose mock for the static functions of a given class.
Arguments:
Returns: goog.testing.LooseMock
The mock created for the static functions
of the provided class.
|
code » | |||||
![]()
Gets either a loose or strict mock for a given class based on a set of
arguments.
Arguments:
Returns: !goog.testing.StrictMock | !goog.testing.LooseMock
The mock created
for the provided class.
|
code » | |||||
Returns a proxy constructor closure. Since this is a constructor, "this"
refers to the local scope of the constructed object thus bind cannot be
used.
|
code » | |||||
Returns a proxy function for a mock class instance. This function cannot
be used with bind since "this" must refer to the scope of the proxy
constructor.
|
code » | |||||
Gets either a loose or strict mock for the static functions of a given class.
Arguments:
Returns: goog.testing.StrictMock | goog.testing.LooseMock
The mock created
for the static functions of the provided class.
|
code » | |||||
Gets a strict mock for a given class.
Arguments:
Returns: goog.testing.StrictMock
The mock created for the provided class.
|
code » | |||||
Gets a strict mock for the static functions of a given class.
Arguments:
Returns: goog.testing.StrictMock
The mock created for the static functions
of the provided class.
|
code » | |||||
![]()
Resests the factory by reverting all mocked classes to their original
implementations and removing all MockClassRecords.
|
code » |
![]()
A map from class name -> goog.testing.MockClassRecord.
|
Code » |
![]()
The names of the fields that are defined on Object.prototype.
|
Code » | |
A singleton instance of the MockClassFactory.
|
Code » |