MockspressoJUnit4Rule

interface MockspressoJUnit4Rule : Mockspresso, TestRule

Functions

Link copied to clipboard
abstract fun addDynamicObjectMaker(dynamicMaker: DynamicObjectMaker)
Link copied to clipboard
abstract fun apply(p0: Statement?, p1: Description?): Statement?
Link copied to clipboard
Link copied to clipboard
abstract fun <T> createNow(key: DependencyKey<T>): T
Link copied to clipboard
abstract fun <T> dependency(key: DependencyKey<T>, provider: Dependencies.() -> T): Lazy<T>
Link copied to clipboard
abstract fun ensureInit()
Link copied to clipboard
abstract fun <T> findDependency(key: DependencyKey<T>): Lazy<T>
Link copied to clipboard
abstract fun <T> findNow(key: DependencyKey<T>): T
Link copied to clipboard
abstract fun <BIND, IMPL : BIND> interceptRealImplementation(key: DependencyKey<BIND>, implementationToken: TypeToken<IMPL>, interceptor: (IMPL) -> IMPL): Lazy<IMPL>
Link copied to clipboard

Create a junit rule to handle mockspresso lifecycle callbacks. Apply this using the org.junit.Rule annotation in your test.

Link copied to clipboard
abstract fun onSetup(cmd: (MockspressoInstance) -> Unit)
Link copied to clipboard
abstract fun onTeardown(cmd: () -> Unit)
Link copied to clipboard
abstract fun teardown()