Call

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

Constructors

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

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)
Undocumented in source. Be warned that the author may not have intended to support it.
passThrough
typeof(this) passThrough()

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

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.

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