package Ġcom . kick starter . testing . login . suite Ċ import Ġandroid . content . Intent Ċ import Ġandroidx . test . espress o . intent . rule . Intent s Test Rule Ċ import Ġandroidx . test . filters . Small Test Ċ import Ġandroidx . test . platform . app . Instrumentation Registry Ċ import Ġcom . kick starter . R Ċ import Ġcom . kick starter . testing . utils . Events Ċ import Ġcom . kick starter . testing . utils . Matchers Ċ import Ġcom . kick starter . ui . Intent Key Ċ import Ġcom . kick starter . ui . activities . Login Activity Ċ import Ġcom . kick starter . ui . data . Login Reason Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ Ċ @ Small Test Ċ class ĠReset Password Success Test Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġevents Ġ= ĠEvents () ĊĠĠĠ Ġprivate Ġval Ġcheck That Ġ= ĠMatch ers () ĊĊĠĠĠ Ġ@ Rule ĊĠĠĠ Ġ@ Jvm Field ĊĠĠĠ Ġval Ġactivity Rule : ĠInt ents Test Rule < Login Activity > Ġ= Ġobject Ġ: ĠInt ents Test Rule < Login Activity >( Login Activity :: class . java ){ ĊĠĠĠĠĠĠĠ Ġoverride Ġfun ĠgetActivity Intent (): ĠIntent Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġtarget Context Ġ= ĠInstrument ation Registry . get Instrumentation () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. target Context ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĠIntent ( target Context , ĠLogin Activity :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. putExtra ( Intent Key . EMAIL , Ġ" email @ test . com ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. putExtra ( Intent Key . LOGIN _ REASON , ĠLogin Reason . RESET _ PASSWORD ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Showing Reset Password Success Dialog And Pref illing Email () Ġ{ ĊĠĠĠĠĠĠĠ Ġcheck That . text Matches ( R . id . message _ text _ view ," We âĢĻ ve Ġsent Ġan Ġemail Ġto Ġemail @ test . com Ġwith Ġinstructions Ġto Ġreset Ġyour Ġpassword .") ĊĠĠĠĠĠĠĠ Ġevents . click On View ( R . id . ok _ button ) ĊĠĠĠĠĠĠĠ Ġcheck That . text Matches ( R . id . email ," email @ test . com ") ĊĠĠĠ Ġ} Ċ } Ċ