lundi 9 avril 2018

How do I mock the receiving of an Sms for the purposes of an espresso test

I am implementing the auto reading/population of an OTP (one time password) for login/enrolment within a project i am working on. On successfully answering 3 of multiple random personal detail questions - the OTP SMS is triggered in the onResume() of an enrolment fragment. I need to verify that an SMS intent was sent - and then received - with need the data (sms) sent, for the purposes of an Espresso test. I have been looking at Intending & Intended from the Espresso intent library... but can't figure out a clear path to do this, just yet. Any help appreciated

Aucun commentaire:

Enregistrer un commentaire