goog.testing.MockExpectation
Provided By |
---|
This is a class that represents an expectation.
new MockExpectation( name )
Parameters |
|
---|
Instance Methods
this.addErrorMessage( message ) → void
void
Allow expectation failures to include messages.
Parameters |
|
---|
this.getErrorMessage() → string
string
Get the error messages seen so far.
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.getErrorMessageCount() → number
number
Get how many error messages have been seen so far.
Parameters | None. | ||
---|---|---|---|
Returns |
|
Instance Properties
this.actualCalls → number
number
The number of times this method is called by real code.
this.argumentList → (Array<*>|null)
(Array<*>|null)
The arguments that are expected to be passed to this function
An array of error messages for expectations not met.
this.exceptionToThrow → *
*
The value that will be thrown when the method is called
this.maxCalls → number
number
The maximum number of times this method should be called.
this.minCalls → number
number
The minimum number of times this method should be called.
this.name → string
string
The name of the method that is expected to be called.
this.returnValue → *
*
The value that this method should return.
this.toDo → (Function|null)
(Function|null)
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.
this.verificationCalls → number
number
The number of times this method is called during the verification phase.