Package io. mockk
Types
Functions
Checks if all recorded calls are necessary.
Clears all regular, object, static and constructor mocks.
Clears constructor mock.
Resets information associated with specified mocks. To clear all mocks use clearAllMocks.
Cancel static mocks.
Exclude calls from recording for a suspend block
Checks if all recorded calls were verified.
Verifies that calls were made inside a coroutine.
Verifies that all calls inside verifyBlock happened. Does not verify any order. Coroutine version
Verifies that all calls inside verifyBlock happened, checking that they happened in the order declared. Coroutine version.
Verifies that all calls inside verifyBlock happened, and no other call was made to those mocks
Exclude calls from recording
Builds a constructor mock. Old constructor mocks of same classes are cancelled before.
Builds a constructor mock and unmocks it after the block has been executed.
Builds an Object mock. Any mocks of this exact object are cancelled before it's mocked.
Builds a static mock and unmocks it after the block has been executed.
Builds a static mock. Old static mocks of same classes are cancelled before.
Builds a static mock. Any mocks of this exact class are cancelled before it's mocked
Builds a static mock and unmocks it after the block has been executed.
Builds a static mock. Any mocks of this function's declaring class are cancelled before it's mocked
Builds a static mock and unmocks it after the block has been executed.
Registers instance factory and returns object able to do deregistration.
Builds a new spy for specified class. Initializes object via default constructor.
Builds a new spy for specified class, copying fields from objToCopy.
Cancels object, static and constructor mocks.
Cancel constructor mocks.
Cancel object mocks.
Cancel static mocks.
Cancel static mocks.
Verifies that calls were made in the past. Part of DSL
Verifies that all calls inside verifyBlock happened. Does not verify any order.
Verifies that all calls inside verifyBlock happened, checking that they happened in the order declared.
Verifies that all calls inside verifyBlock happened, and no other call was made to those mocks
Properties
Returns the defining top-level extension function's Class.