mockito-kotlin / com.nhaarman.mockitokotlin2 / org.mockito.stubbing.OngoingStubbing / doReturn

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.

inline infix fun <reified T> OngoingStubbing<T>.doReturn(ts: List<T>): OngoingStubbing<T>
Deprecated: Use doReturnConsecutively instead

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