Call

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

Members

Functions

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.

compareArguments
bool compareArguments(ParameterTypes arguments)

Compares arguments of this call with the given arguments.

passThrough
typeof(this) passThrough()

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

returns
typeof(this) returns(Return value)

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

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.

Parameters

F

Function represented by this $(D_PSYMBOL Call).

Meta