Package com.episode6.mockspresso2.plugins.mockito.factories

Functions

Link copied to clipboard
inline fun <A : Annotation> MockspressoBuilder.autoFactoriesByAnnotation(): MockspressoBuilder

Marks any class encountered with the given A annotation as a Factory object. The object will be mocked and each method will return a dependency from the underlying Mockspresso instance.

Link copied to clipboard
inline fun <T> MockspressoBuilder.autoFactory(qualifier: Annotation? = null): MockspressoBuilder

inline fun <T> MockspressoProperties.autoFactory(qualifier: Annotation? = null): Lazy<T>

Mark type T (with optional qualifier) as a Factory object which is also accessible via the returned lazy. The object will be mocked and each method will return a dependency from the underlying Mockspresso instance.