ExpectationSetup.action

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. If it does not, an exception will be thrown. The called method will return whatever the given delegate returns.

class ExpectationSetup
action
(
T
U...
)
(
T delegate(
U
)
action
)

Examples

m.expect(myObj.myFunc(0, null, null, 'a')
   .ignoreArgs()
   .action((int i, char[] s, Object o, char c) { return -1; });

Meta