SuspendCallDefinitionScope

Provides a set of operation for SuspendAnsweringScope.calls.

Properties

Link copied to clipboard
abstract val returnType: KClass<*>

Mocked method return type KClass.

Link copied to clipboard
abstract val self: Any?

It serves as a this and returns mock object.

Functions

Link copied to clipboard
abstract suspend fun callOriginal(): R

Calls original implementation of mocked method with original args. For interfaces, it is default implementation.

Link copied to clipboard
abstract suspend fun callOriginalWith(vararg args: Any?): R

Calls original implementation of mocked method with given args. For interfaces, it is default implementation.

Link copied to clipboard
abstract suspend fun callSuper(type: KClass<*>): R

Calls implementation of mocked method from super type with original args. For interfaces, it is default implementation of this type.

Link copied to clipboard
abstract suspend fun callSuperWith(type: KClass<*>, vararg args: Any?): R

Calls implementation of mocked method from super type with given args. For interfaces, it is default implementation of this type.

Link copied to clipboard
inline fun <T> CallDefinitionScope<*>.self(): T