Package com. episode6. reflectivemockk
Types
Link copied to clipboard
The receiver used to conveniently define reflective stubs on a mockK.
Link copied to clipboard
class TypeTokenResolutionError(referencedType: KType, context: KType) : AssertionError
Content copied to clipboard
Thrown when an error occurs while trying to resolve a KType into a concrete TypeToken
Functions
Link copied to clipboard
inline fun <RECEIVER : Any> <Error class: unknown class>.callTo(callable: KCallable<*>, receiver: RECEIVER): Any?
Content copied to clipboard
fun <Error class: unknown class>.callTo( callable: KCallable<*>, receiver: Any, receiverType: KType): Any?
Content copied to clipboard
Allows for reflection-based stubbing of methods.
Link copied to clipboard
Link copied to clipboard
inline fun <T : Any> T.reflectiveStubs(stubbing: ReflectiveStubbing<T>.() -> Unit): T
Content copied to clipboard
Apply reflective stubs to an existing mockK.
Link copied to clipboard
inline suspend fun <RECEIVER : Any> <Error class: unknown class>.suspendCallTo(callable: KCallable<*>, receiver: RECEIVER): Any?
Content copied to clipboard
suspend fun <Error class: unknown class>.suspendCallTo( callable: KCallable<*>, receiver: Any, receiverType: KType): Any?
Content copied to clipboard
Allows for reflection-based stubbing of suspend methods.