package Ġcom . j pp . mp . screens . main . credits Ċ Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Id Ċ import Ġandroidx . test . ext . junit . runners . Android JUnit 4 Ċ import Ġcom . j pp . mp . R Ċ import Ġcom . j pp . mp . assertions . Nested ScrollView Extension Ċ import Ġcom . j pp . mp . assertions . assert Displayed Ċ import Ġcom . j pp . mp . assertions . assertNot Displayed Ċ import Ġcom . j pp . mp . assertions . assert With Text Ċ import Ġcom . j pp . mp . assertions . onError View Button Ċ import Ġcom . j pp . mp . assertions . onError View Text Ċ import Ġcom . j pp . mp . extras . navigate To Movie Credits Ċ import Ġcom . j pp . mp . extras . navigate To Movie Details Ċ import Ġcom . j pp . mp . stub bers . stub Configuration Default Ċ import Ġcom . j pp . mp . stub bers . stub Movie Credits WithError Ċ import Ġcom . j pp . mp . stub bers . stub Movie Details Ċ import Ġcom . j pp . mp . stub bers . stub Now Playing First Page Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ class ĠCred its Movie Error Test Ġ: ĠBase Credits IntegrationTest () Ġ{ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshould Show Connectivity Error () Ġ{ ĊĠĠĠĠĠĠĠ Ġstub Configuration Default () ĊĠĠĠĠĠĠĠ Ġstub Now Playing First Page () ĊĠĠĠĠĠĠĠ Ġstub Movie Details () ĊĊĠĠĠĠĠĠĠ Ġ// Ġ-- Ġlaunch Ġapp Ġand Ġmove Ġto Ġmovie Ġdetails ĊĠĠĠĠĠĠĠ Ġactivity Test Rule . launch () ĊĠĠĠĠĠĠĠ ĠwaitFor Movies Loading Done () ĊĠĠĠĠĠĠĠ Ġnavigate To Movie Details () ĊĠĠĠĠĠĠĠ ĠwaitFor Movie Details Loaded () ĊĊĠĠĠĠĠĠĠ Ġactivity Test Rule . simulate Not Connected To Network () ĊĊĠĠĠĠĠĠĠ Ġ// Ġ-- Ġgo Ġto Ġmovie Ġcredits ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . detail Credits Selection View )). perform ( Nested ScrollView Extension ()) ĊĠĠĠĠĠĠĠ Ġnavigate To Movie Credits () ĊĠĠĠĠĠĠĠ ĠwaitFor Movie Credits Loaded () ĊĊĠĠĠĠĠĠĠ Ġon Credits Loading View (). assertNot Displayed () ĊĠĠĠĠĠĠĠ Ġon Credits ListView (). assertNot Displayed () ĊĊĠĠĠĠĠĠĠ Ġon Credits Error View (). assert Displayed () ĊĠĠĠĠĠĠĠ ĠonError View Text (). assert With Text ( R . string . error _ no _ network _ connection _ message ) ĊĠĠĠĠĠĠĠ ĠonError View Button (). assert With Text ( R . string . error _ retry ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshould Show Unknown Error () Ġ{ ĊĠĠĠĠĠĠĠ Ġstub Configuration Default () ĊĠĠĠĠĠĠĠ Ġstub Now Playing First Page () ĊĠĠĠĠĠĠĠ Ġstub Movie Details () ĊĠĠĠĠĠĠĠ Ġstub Movie Credits WithError () ĊĊĠĠĠĠĠĠĠ Ġ// Ġ-- Ġlaunch Ġapp Ġand Ġmove Ġto Ġmovie Ġdetails ĊĠĠĠĠĠĠĠ Ġactivity Test Rule . launch () ĊĠĠĠĠĠĠĠ ĠwaitFor Movies Loading Done () ĊĠĠĠĠĠĠĠ Ġnavigate To Movie Details () ĊĠĠĠĠĠĠĠ ĠwaitFor Movie Details Loaded () ĊĊĠĠĠĠĠĠĠ Ġ// Ġ-- Ġgo Ġto Ġmovie Ġcredits ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . detail Credits Selection View )). perform ( Nested ScrollView Extension ()) ĊĠĠĠĠĠĠĠ Ġnavigate To Movie Credits () ĊĠĠĠĠĠĠĠ ĠwaitFor Movie Credits Loaded () ĊĊĠĠĠĠĠĠĠ Ġon Credits Loading View (). assertNot Displayed () ĊĠĠĠĠĠĠĠ Ġon Credits ListView (). assertNot Displayed () ĊĊĠĠĠĠĠĠĠ Ġon Credits Error View (). assert Displayed () ĊĠĠĠĠĠĠĠ ĠonError View Text (). assert With Text ( R . string . error _ unexpected _ error _ message ) ĊĠĠĠĠĠĠĠ ĠonError View Button (). assert With Text ( R . string . error _ retry ) ĊĠĠĠ Ġ} Ċ } Ċ