doReturn

infix fun <T> OngoingStubbing<T>.doReturn(t: T): OngoingStubbing<T>

Sets a return value to be returned when the method is called.

Alias for OngoingStubbing.thenReturn.


fun <T> OngoingStubbing<T>.doReturn(t: T, vararg ts: T): OngoingStubbing<T>

Sets consecutive return values to be returned when the method is called.

Alias for OngoingStubbing.thenReturn.


fun doReturn(value: Any?): Stubber
fun doReturn(toBeReturned: Any?, vararg toBeReturnedNext: Any?): Stubber