Stub

A BaseMethodMock.Stub for non-suspending methods.

Constructors

Link copied to clipboard
constructor(matchers: M)

Properties

Link copied to clipboard
open override val matchers: M

Functions

Link copied to clipboard
fun call(values: V): R

Calls this stub with a given set of values

Link copied to clipboard
fun doAnswer(answer: Answer<V, R>)

Sets the answer for this stub to a given answer.

Link copied to clipboard
fun doExecute(action: (V) -> R)

Sets the answer to execute a given code block.

Link copied to clipboard
fun doReturn(value: R)

Sets the answer to return a given value.

Link copied to clipboard
fun doThrow(throwable: Throwable)

Sets the answer to throw a given Throwable