Home

# Class goog.testing.LooseMock

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.

extends goog.testing.Mock

Instance Method Summary
| `$recordCall(string name, ?Array args) ⇒ <Any Type>` Records an actual method call, intended to be overridden by a subclass. The subclass must find the pending expectation and return the correct value.
| `$recordExpectation()` Records the currently pending expectation, intended to be overridden by a subclass.
| `$replay()` Switches from recording to replay mode.
| `$reset()` Resets the state of this mock object. This clears all pending expectations without verifying, and puts the mock in recording mode.
| `$setIgnoreUnexpectedCalls(boolean ignoreUnexpectedCalls) ⇒ ?goog.testing.LooseMock` A setter for the ignoreUnexpectedCalls field.
| `$verify()` Verify that all of the expectations were met. Should be overridden by subclasses.