doCallRealMethod

fun <T> OngoingStubbing<T>.doCallRealMethod(): OngoingStubbing<T>

Calls the real method of the spy/mock when the method is called. E.g:

    whenever { mock.someFunction() }.doCallRealMethod()

This function is an alias for callRealMethod.

Return

OngoingStubbing object used to stub fluently. Do not create a reference to this returned object.


fun doCallRealMethod(): Stubber

Sets to call the real implementation of a method in a mock, to be applied in reverse stubbing.

Example:

    doCallRealMethod().whenever(mock).someMethod()

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

Return

Stubber object used to stub fluently.