package Ġcom . pe ch uro . bs uir schedule . screen Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . view . View Ċ import Ġandroidx . annotation . Id Res Ċ import Ġandroidx . test . core . app . Application Provider Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ import Ġandroidx . test . espress o . No Matching View Exception Ċ import Ġandroidx . test . espress o . action . View Actions . click Ċ import Ġandroidx . test . espress o . assertion . View Assertions . matches Ċ import Ġandroidx . test . espress o . matcher . View Matchers . is Displayed Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Id Ċ import Ġcom . pe ch uro . bs uir schedule . assertion . ImageView Assertion . is Drawable Exist Or Not Ċ import Ġcom . pe ch uro . bs uir schedule . assertion . RecyclerView Assertion . size At Least Ċ import Ġcom . pe ch uro . bs uir schedule . assertion . RecyclerView Assertion . size Equal Ċ import Ġjunit . framework . Assertion Failed Error Ċ import Ġorg . hamcrest . Core Matchers . not Ċ import Ġorg . hamcrest . Matcher Ċ Ċ abstract Ġclass ĠBase Screen Ġ{ ĊĊĠĠĠ Ġprotected Ġval Ġcontext : ĠContext Ġ= ĠApplication Provider . getApplicationContext () ĊĊĠĠĠ Ġfun Ġclick On View (@ Id Res Ġid : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( id )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġclick On View ( view Matcher : ĠMatcher < View >) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( view Matcher ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcheck Visibility (@ Id Res Ġview Id : ĠInt , Ġexpected : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcheck Visibility ( with Id ( view Id ), Ġexpected ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcheck Visibility ( view Matcher : ĠMatcher < View >, Ġexpected : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( view Matcher ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. check ( matches ( if Ġ( expected ) Ġis Displayed () Ġelse Ġnot ( is Displayed ()))) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcheck ImageView Drawable Exist (@ Id Res Ġid : ĠInt , Ġexpected : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( id )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. check ( is Drawable Exist Or Not ( expected )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcheck List NotEmpty (@ Id Res Ġid : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcheck List NotEmpty ( with Id ( id )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcheck List NotEmpty ( view Matcher : ĠMatcher < View >) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( view Matcher ). check ( size At Least ( 1 )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcheck List Size At Least (@ Id Res Ġid : ĠInt , Ġsize : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( id )). check ( size At Least ( size )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcheck List Size At Least ( view Matcher : ĠMatcher < View >, Ġsize : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( view Matcher ). check ( size At Least ( size )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcheck List Size (@ Id Res Ġid : ĠInt , Ġexpected : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( id )). check ( size Equal ( expected )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġis Visible (@ Id Res Ġview Id : ĠInt ) Ġ= Ġtry Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( view Id )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġtrue ĊĠĠĠ Ġ} Ġcatch Ġ( e : ĠAssertion Failed Error ) Ġ{ ĊĠĠĠĠĠĠĠ Ġfalse ĊĠĠĠ Ġ} Ġcatch Ġ( e : ĠNo Matching View Exception ) Ġ{ ĊĠĠĠĠĠĠĠ Ġfalse ĊĠĠĠ Ġ} Ċ }