MockspressoJUnit5Extension

interface MockspressoJUnit5Extension : Mockspresso, BeforeEachCallback, AfterEachCallback

Functions

Link copied to clipboard
abstract fun addDynamicObjectMaker(dynamicMaker: DynamicObjectMaker)
Link copied to clipboard
abstract fun afterEach(p0: ExtensionContext?)
Link copied to clipboard
abstract fun beforeEach(p0: ExtensionContext?)
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 extension to handle mockspresso lifecycle callbacks. Register the extension using the org.junit.jupiter.api.extension.RegisterExtension annotation in junit5 tests.

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()