spy
inline fun <T> MockspressoProperties.spy(qualifier: Annotation? = null): Lazy<T>
Content copied to clipboard
Create a real object of T using mockspresso then wrap it in a mockito spy. 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 <T> MockspressoProperties.spy(qualifier: Annotation? = null, noinline stubbing: KStubbing<T>.(T) -> Unit): Lazy<T>
Content copied to clipboard
Create a real object of T using mockspresso then wrap it in a mockito spy. 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.