-
public final class KIntentThis class is intended to be used when you need to check if some intent has been sent or to mock specific intent with result
-
-
Constructor Summary
Constructors Constructor Description KIntent(Function1<IntentBuilder, Unit> builder)
-
Method Summary
Modifier and Type Method Description final Unitintended(VerificationMode verificationMode)Checks if this intent has been sent previously final Unitintending(Instrumentation.ActivityResult result)Mocks next coming intent that will match with provided result. final Unitintending(Function1<ActivityResultBuilder, Unit> result)Mocks next coming intent that will match with provided result. final Unitinvoke(Function1<KIntent, Unit> function)-
-
Constructor Detail
-
KIntent
KIntent(Function1<IntentBuilder, Unit> builder)
- Parameters:
builder- Builder for intent matching
-
-
Method Detail
-
intended
final Unit intended(VerificationMode verificationMode)
Checks if this intent has been sent previously
- Parameters:
verificationMode- Verification mode for this intent.
-
intending
final Unit intending(Instrumentation.ActivityResult result)
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
- Parameters:
result- Activity result to return when matched intent is sent.
-
intending
final Unit intending(Function1<ActivityResultBuilder, Unit> result)
Mocks next coming intent that will match with provided result.
- Parameters:
result- Builder for activity result to return when matching intent is sent
-
-
-
-