MockCall

$(D_PSYMBOL Call) represents a single call of a mocked method.

Constructors

this
this()
Undocumented in source.
this
this(size_t index)

Members

Functions

repeat
typeof(this) repeat(uint times)

This expectation will match exactly times times.

repeatAny
typeof(this) repeatAny()

This expectation will match to any number of calls.

Mixins

__anonymous
mixin Call!F
Undocumented in source.

Mixed In Members

From mixin Call!F

returns
typeof(this) returns(Return value)

Set the value to return when method matching this expectation is called on a mock object.

passThrough
typeof(this) passThrough()

Instead of returning or throwing a given value, pass the call through to the mocked type object.

compareArguments
bool compareArguments(ParameterTypes arguments)

Compares arguments of this call with the given arguments.

throws
typeof(this) throws(Exception exception)

When the method which matches this expectation is called, throw the given exception. If there are any actions specified (via the action method), they will not be executed.

throws
typeof(this) throws(string msg, string file, size_t line)

Creates an exception of type E and throws it when the method which matches this expectation is called.

action
typeof(this) action(Action callback)

When the method which matches this expectation is called execute the given delegate. The delegate's signature must match the signature of the called method.

Parameters

F

Function represented by this $(D_PSYMBOL Call).

Meta