spyImplOf

inline fun <BIND, IMPL : BIND> MockspressoProperties.spyImplOf(qualifier: Annotation? = null): Lazy<IMPL>

Create a real object of type IMPL using mockspresso then wrap it in a mockito spy (the object will be bound using type BIND). This spy will be part of the mockspresso graph and can be used by other real objects (and then verified in test code).


inline fun <BIND, IMPL : BIND> MockspressoProperties.spyImplOf(qualifier: Annotation? = null, noinline stubbing: KStubbing<IMPL>.(IMPL) -> Unit): Lazy<IMPL>

Create a real object of type IMPL using mockspresso then wrap it in a mockito spy (the object will be bound using type BIND). This spy will be part of the mockspresso graph and can be used by other real objects (and then verified in test code). The stubbing will be applied to the spy before it is injected as a dependency into other classes.