package Ġcom . av ito . android . ui . test Ċ Ċ import Ġcom . av ito . android . test . app . core . screen Rule Ċ import Ġcom . av ito . android . ui . Swipe Refresh Activity Ċ import Ġorg . hamcrest . Core Matchers . equalTo Ċ import Ġorg . hamcrest . Matcher Assert . assertThat Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ Ċ class ĠSw ipe Refresh Test Ġ{ ĊĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġval Ġrule Ġ= Ġscreen Rule < Swipe Refresh Activity >() ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġrefresh _ on Pull To Refresh _ list Action () Ġ{ ĊĠĠĠĠĠĠĠ Ġrule . launch Activity ( null ) ĊĊĠĠĠĠĠĠĠ ĠScreen . swipe Refresh . list . actions . pull To Refresh () ĊĊĠĠĠĠĠĠĠ ĠScreen . swipe Refresh . swipe Refresh Element . checks . is Refresh ing () ĊĠĠĠĠĠĠĠ ĠassertThat ( rule . activity . ref reshed Times , ĠequalTo ( 1 )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġrefresh _ on Pull To Refresh _ swipe Refresh Action () Ġ{ ĊĠĠĠĠĠĠĠ Ġrule . launch Activity ( null ) ĊĊĠĠĠĠĠĠĠ ĠScreen . swipe Refresh . swipe Refresh Element . actions . pull To Refresh () ĊĊĠĠĠĠĠĠĠ ĠassertThat ( rule . activity . ref reshed Times , ĠequalTo ( 1 )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġstop _ refresh ing _ by _ int ention () Ġ{ ĊĠĠĠĠĠĠĠ Ġrule . launch Activity ( null ) ĊĊĠĠĠĠĠĠĠ ĠScreen . swipe Refresh . swipe Refresh Element . actions . pull To Refresh () ĊĊĠĠĠĠĠĠĠ Ġrule . activity . post And Stop Refresh ing () ĊĊĠĠĠĠĠĠĠ ĠScreen . swipe Refresh . swipe Refresh Element . checks . isNot Refresh ing () ĊĠĠĠ Ġ} Ċ } Ċ