Package 

Class 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

    • 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