testing.MockExpectation Extends
This is a class that represents an expectation.

Inheritance

Constructor

goog.testing.MockExpectation(name)

Parameters

name : string
The name of the method for this expectation.

Instance Methods

Public Protected Private
addErrorMessage(message)
Allow expectation failures to include messages.
Arguments:
message : string
The failure message.
code »
getErrorMessage() string
Get the error messages seen so far.
Returns: string  Error messages separated by \n.
code »
getErrorMessageCount() number
Get how many error messages have been seen so far.
Returns: number  Count of error messages.
code »

Instance Properties

actualCalls :
The number of times this method is called by real code.
Code »
argumentList :
The arguments that are expected to be passed to this function
Code »
errorMessages :
An array of error messages for expectations not met.
Code »
exceptionToThrow :
The value that will be thrown when the method is called
Code »
maxCalls :
The maximum number of times this method should be called.
Code »
minCalls :
The minimum number of times this method should be called.
Code »
name :
The name of the method that is expected to be called.
Code »
returnValue :
The value that this method should return.
Code »
toDo :
The function which will be executed when this method is called. Method arguments will be passed to this function, and return value of this function will be returned by the method.
Code »
verificationCalls :
The number of times this method is called during the verification phase.
Code »

Package testing

Package Reference