goog.testing.async.MockControl
Classgoog.testing.async.MockControl(mockControl)
Provides asynchronous mocks and assertions controlled by a parent MockControl.
mockControl
{goog.testing.MockControl
}
.assertDeferredEquals(message, expected, actual)
Asserts that a deferred object will call its callback with the given value.
message
{string
}
expected
{goog.async.Deferred
|*}
actual
{goog.async.Deferred
|*}
.assertDeferredError(deferred, fn)
Asserts that a deferred object will have an error and call its errback function.
deferred
{goog.async.Deferred
}
fn
{function
() : void
}
.asyncAssertEquals(message, var_args)
Returns a function that will assert that its arguments are equal to the arguments given to asyncAssertEquals. In addition, the function also asserts that it will be called.
message
{string
}
var_args
{...*}
function
(...[*]) : void
}
.createCallbackMock(name, callback, opt_selfObj)
Returns a function that will assert that it will be called, and run the given callback when it is.
name
{string
}
callback
{function
(...[*]) : *}
opt_selfObj
{Object
=}
Function
}