mockito-kotlin / com.nhaarman.mockitokotlin2 / spy

spy

inline fun <reified T : Any> spy(): T

Creates a spy of the real object. The spy calls real methods unless they are stubbed.

inline fun <reified T : Any> spy(stubbing: KStubbing<T>.(T) -> Unit): T
inline fun <reified T> spy(value: T, stubbing: KStubbing<T>.(T) -> Unit): T

Creates a spy of the real object, allowing for immediate stubbing. The spy calls real methods unless they are stubbed.

fun <T> spy(value: T): T

Creates a spy of the real object. The spy calls real methods unless they are stubbed.