KIntent

public final class KIntent

This class is intended to be used when you need to check if some intent has been sent or to mock specific intent with result

Parameters

builder

Builder for intent matching

Constructors

Link copied to clipboard
public KIntent KIntent(Function1<IntentBuilder, Unit> builder)

Functions

Link copied to clipboard
public final Unit intended(VerificationMode verificationMode)

Checks if this intent has been sent previously

Link copied to clipboard

Mocks next coming intent that will match with provided result. If no result provided as parameter, function will look up default one set via withResult() in IntentBuilder. If none are present, IllegalStateException will be thrown

public final Unit intending(Function1<ActivityResultBuilder, Unit> result)

Mocks next coming intent that will match with provided result.

Link copied to clipboard
public final Unit invoke(Function1<KIntent, Unit> function)