package Ġcom . github . kit tin un f . reactive android . widget Ċ Ċ import Ġandroid . support . test . Instrumentation Registry Ċ import Ġandroid . support . test . annotation . Ui Thread Test Ċ import Ġandroid . support . test . rule . Activity Test Rule Ċ import Ġandroid . support . test . runner . Android JUnit 4 Ċ import Ġio . reactivex . ob servers . Test Observer Ċ import Ġorg . hamcrest . Core Matchers . equalTo Ċ import Ġorg . hamcrest . Matcher Assert . assertThat Ċ import Ġorg . junit . Ignore Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ class ĠCalendar View Event Test Ġ{ ĊĊĠĠĠ Ġ@ Rule ĊĠĠĠ Ġ@ Jvm Field ĊĠĠĠ Ġval Ġactivity Rule Ġ= ĠActivity Test Rule ( Calendar View Test Activity :: class . java ) ĊĊĠĠĠ Ġval Ġinstrument ation Ġ= ĠInstrument ation Registry . get Instrumentation () ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Ui Thread Test ĊĠĠĠ Ġ@ Ignore ĊĠĠĠ Ġfun Ġtest Date Change () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcalendar View Ġ= Ġactivity Rule . activity . calendar View ĊĊĠĠĠĠĠĠĠ Ġval Ġt Ġ= ĠTest Observer < Date ChangeListener >() ĊĠĠĠĠĠĠĠ Ġcalendar View . rx _ date Change (). subscribe With ( t ) ĊĊĠĠĠĠĠĠĠ Ġt . assert No Values () ĊĠĠĠĠĠĠĠ Ġt . assert No Errors () ĊĊĠĠĠĠĠĠĠ Ġt . assert Value Count ( 1 ) ĊĊĠĠĠĠĠĠĠ Ġval Ġfirst Ġ= Ġt . values (). first () ĊĠĠĠĠĠĠĠ ĠassertThat ( first . year , ĠequalTo ( 2 0 1 6 )) ĊĠĠĠ Ġ} Ċ Ċ } Ċ