doNothing

fun doNothing(): Stubber

Sets to do nothing, to be applied in reverse stubbing. This comes handy is some rare cases, like:

  • stubbing consecutive calls with different behavior

  • when spying a real object, suppress the real implementation of the spied object

Example:

    doNothing().whenever(mock).someMethod()

This function is an alias for Mockito's Mockito.doNothing.

Return

Stubber object used to stub fluently.