Package-level declarations
Types
An answer for a function call. For blocking answers only call implementation is required. For suspending answers callSuspend should be implemented and call implementation should throw an exception. Use Suspending for convenience.
Scope for defining an answer for a function call.
Marker interface for defining an answer for non-suspend function call.
Provides a set of operation for BlockingAnsweringScope.calls.
Marker interface for sequential answer builder for non-suspend function
Provides a base set of operation for BlockingAnsweringScope.calls and SuspendAnsweringScope.calls.
Provides a set of mocked function related operations that might be required for implementing Answer.
Marker interface for sequential answer builder for any function
Marker interface for defining an answer for suspend function call.
Provides a set of operation for SuspendAnsweringScope.calls.
Marker interface for sequential answer builder for suspend function
Functions
Calls super method according to SuperCall.
Function call executes block.
Suspend function call executes block.
Function call executes block inside runCatching and returns Result. It rethrows any dev.mokkery.MokkeryRuntimeException as it indicates internal error and cannot be ignored.
Suspend function call executes block inside runCatching and returns Result. It rethrows any dev.mokkery.MokkeryRuntimeException as it indicates internal error and cannot be ignored.
Allows to define a set of answers in sequentially that will repeat in cycles.
Function call returns argument at index.
Function call returns Result.failure with error.
Function call returns Result.failure with exception provided each time by function.
Function call returns Result.success with value.
Function call returns Result.success with value provided each time by function.
Returns CallDefinitionScope.self as T.
Function call will answer sequentially with answers defined in block.
Simplification for BlockingAnsweringScope.sequentially with repeat.
Simplification for SuspendAnsweringScope.sequentially with repeat.
Simplification for sequentially with multiple returns calls.
Simplification for sequentially with multiple throws calls.
Function call always throws an IllegalStateException with given message.