Package-level declarations

Functions

Link copied to clipboard
fun <T> coGiven(stubBlock: suspend MockKMatcherScope.() -> T): MockKStubScope<T, T>

Starts a block of stubbing for coroutines in BDD style. Part of DSL. Similar to given, but works with suspend functions.

Link copied to clipboard
fun coThen(ordering: Ordering = Ordering.UNORDERED, inverse: Boolean = false, atLeast: Int = 1, atMost: Int = Int.MAX_VALUE, exactly: Int = -1, timeout: Long = 0, verifyBlock: suspend MockKVerificationScope.() -> Unit)

Verifies that calls were made inside a coroutine in BDD style.

Link copied to clipboard
fun <T> given(stubBlock: MockKMatcherScope.() -> T): MockKStubScope<T, T>

Starts a block of stubbing in BDD style. Part of DSL.

Link copied to clipboard
fun then(ordering: Ordering = Ordering.UNORDERED, inverse: Boolean = false, atLeast: Int = 1, atMost: Int = Int.MAX_VALUE, exactly: Int = -1, timeout: Long = 0, verifyBlock: MockKVerificationScope.() -> Unit)

Verifies calls happened in the past in BDD style. Part of DSL