dependency
abstract fun <T> dependency(key: DependencyKey<T>, provider: Dependencies.() -> T): Lazy<T>
Content copied to clipboard
Register a dependency provided by provider, bound in the mockspresso graph with key and return a Lazy of that object.
IMPORTANT: Reading the value from the returned lazy will cause the underlying MockspressoInstance to be ensured if it hasn't been already.