search

goog.testing.LooseMock

Provided By
Extends
All Implemented Interfaces
All Known Direct Subclasses

This is a mock that does not care about the order of method calls. As a result, it won't throw exceptions until verify() is called. The only exception is that if a method is called that has no expectations, then an exception will be thrown.

new LooseMock( objectToMock, opt_ignoreUnexpectedCalls, opt_mockStaticMethods, opt_createProxy )

Parameters
objectToMock(Object|null)

The object that should be mocked, or the constructor of an object to mock.

opt_ignoreUnexpectedCallsboolean=

Whether to ignore unexpected calls.

opt_mockStaticMethodsboolean=

An optional argument denoting that a mock should be constructed from the static functions of a class.

opt_createProxyboolean=

An optional argument denoting that a proxy for the target mock should be created.

Instance Methods

Instance Properties