Answer
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.
Inheritors
Types
Used whenever there is no defined answer for a call to mock that is in dev.mokkery.MockMode.autofill. Refer to AutofillProvider.forMockMode to read more about returned values.
Just like Block but for suspending functions.
Interface for every answer that have to be called in repeat when specified in sequentially.
Returns results of answers from iterator until empty. It supports nested Sequential answers and calls them until they are empty.
Convenience interface for custom suspending answers. By default, it throws runtime exception on call.
Functions
Provides a return value for a function call with given scope.
Returns human-readable answer description. By default, it returns answers $this
. It's used for debugging purposes.