Controls a set of mocks. Controlled mocks are replayed, verified, and cleaned-up at the same time.
Instance Method Summary | |
$replayAll() Calls replay on each controlled mock. | |
$resetAll() Calls reset on each controlled mock. | |
$tearDown() Calls tearDown on each controlled mock, if necesssary. | |
$verifyAll() Calls verify on each controlled mock. | |
addMock(?goog.testing.MockInterface mock) ⇒ ?goog.testing.MockInterface Takes control of this mock. | |
createConstructorMock(?Object scope, string constructorName, number= opt_strictness) ⇒ ?goog.testing.MockInterface Creates a controlled MethodMock for a constructor. Passes its arguments through to the MethodMock constructor. See {@link goog.testing.createConstructorMock} for details. | |
createFunctionMock(string= opt_functionName, number= opt_strictness) ⇒ ?goog.testing.MockInterface Creates a controlled FunctionMock. Passes its arguments through to the FunctionMock constructor. | |
createGlobalFunctionMock(string functionName, number= opt_strictness) ⇒ ?goog.testing.MockInterface Creates a controlled GlobalFunctionMock. Passes its arguments through to the GlobalFunctionMock constructor. | |
createLooseMock(?Object objectToMock, boolean= opt_ignoreUnexpectedCalls, boolean= opt_mockStaticMethods, boolean= opt_createProxy) ⇒ ?goog.testing.LooseMock Creates a controlled LooseMock. Passes its arguments through to the LooseMock constructor. | |
createMethodMock(?Object scope, string functionName, number= opt_strictness) ⇒ ?goog.testing.MockInterface Creates a controlled MethodMock. Passes its arguments through to the MethodMock constructor. | |
createStrictMock(?Object objectToMock, boolean= opt_mockStaticMethods, boolean= opt_createProxy) ⇒ ?goog.testing.StrictMock Creates a controlled StrictMock. Passes its arguments through to the StrictMock constructor. |