Package-level declarations
Types
Functions
Matches any Kotlin value class with the same boxed type by taking its boxed type.
Creates a custom argument matcher. null values will never evaluate to true.
Registers a custom ArgumentMatcher. The original Mockito function registers the matcher and returns null, here the required type is returned.
Creates a KArgumentCaptor for given type.
Creates a KArgumentCaptor for given type, taking in a lambda to allow fast verification.
Creates 2 KArgumentCaptors for given types.
Creates 3 KArgumentCaptors for given types.
Creates 4 KArgumentCaptors for given types.
Any array argument that is equal to the given array, i.e. it has to have the same type, length, and each element has to be equal.
boolean array argument that is equal to the given array, i.e. it has to have the same length, and each element has to be equal.
byte array argument that is equal to the given array, i.e. it has to have the same length, and each element has to be equal.
char array argument that is equal to the given array, i.e. it has to have the same length, and each element has to be equal.
double array argument that is equal to the given array, i.e. it has to have the same length, and each element has to be equal.
float array argument that is equal to the given array, i.e. it has to have the same length, and each element has to be equal.
int array argument that is equal to the given array, i.e. it has to have the same length, and each element has to be equal.
long array argument that is equal to the given array, i.e. it has to have the same length, and each element has to be equal.
short array argument that is equal to the given array, i.e. it has to have the same length, and each element has to be equal.
Allows at-least-once verification.
Use this method in order to only clear invocations, when stubbing is non-trivial.
Adds a description to be printed if verification fails.
Alias for BDDMockito.given with a suspending lambda
Ignores stubbed methods of given mocks for the sake of verification.
Creates a mock for T.
Creates a mock for T, allowing for immediate stubbing.
Creates a KArgumentCaptor for given nullable type.
Creates a KArgumentCaptor for given nullable type, taking in a lambda to allow fast verification.
Creates a spy of the real object. The spy calls real methods unless they are stubbed.
Creates a spy of the real object, allowing for immediate stubbing. The spy calls real methods unless they are stubbed.
Verifies certain behavior happened once.
Verify multiple calls on mock Supports an easier to read style of
Verifies certain behavior happened at least once / exact number of times / never.
Verifies certain suspending behavior happened once.
Verifies certain behavior happened at least once / exact number of times / never.
Checks if any of given mocks has any unverified interaction.
Verifies that no interactions happened on given mocks beyond the previously verified interactions.
Enables stubbing suspending methods. Use it when you want the mock to return particular value when particular suspending method is called.
Alias for when with suspending function
Alias for BBDMyOngoingStubbing.willAnswer, accepting a lambda.
Alias for BBDMyOngoingStubbing.willReturn.
Alias for BBDMyOngoingStubbing.willAnswer, accepting a suspend lambda.
Alias for BBDMyOngoingStubbing.willThrow.
Sets a Throwable type to be thrown when the method is called.
Sets Throwable classes to be thrown when the method is called.
Allows mock creation with additional mock settings. See MockSettings.