@NotNull abstract fun <T : Any!, V : T> dependency(@NotNull clazz: Class<T>, @Nullable value: V?): Mockspresso.Builder
Apply a specific instance of an object as a mockspresso dependency.
clazz
- Class<T>: The class of the dependency we're applying
value
- V?: The instance of the dependency we're applying
Return
Mockspresso.Builder: this
@NotNull abstract fun <T : Any!, V : T> dependency(@NotNull typeToken: TypeToken<T>, @Nullable value: V?): Mockspresso.Builder
Apply a specific instance of an object as a mockspresso dependency.
typeToken
- TypeToken<T>: The typeToken of the dependency we're applying
value
- V?: The instance of the dependency we're applying
Return
Mockspresso.Builder: this
@NotNull abstract fun <T : Any!, V : T> dependency(@NotNull key: DependencyKey<T>, @Nullable value: V?): Mockspresso.Builder
Apply a specific instance of an object as a mockspresso dependency.
key
- DependencyKey<T>: The DependencyKey of the dependency we're applying.
value
- V?: The instance of the dependency we're applying.
Return
Mockspresso.Builder: this