package Ġcom . ja ime gc . covid 1 9 tracker . room Ċ Ċ import Ġcom . google . common . truth . Truth . assertThat Ċ import Ġcom . ja ime gc . covid 1 9 tracker . Model Factory Test . world And Countries Stats Po jo Ċ import Ġcom . ja ime gc . covid 1 9 tracker . util . Database Ro bo lectric Test Ċ import Ġkotlinx . coroutines . flow . collect Ċ import Ġkotlinx . coroutines . flow . take Ċ import Ġkotlinx . coroutines . run Blocking Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . ro bo lectric . Ro bo lectric TestRunner Ċ Ċ @ RunWith ( Ro bo lectric TestRunner :: class ) Ċ class ĠC ov id Tracker Dao Ro bo lectric Test Ġ: ĠDatabase Ro bo lectric Test () Ġ{ ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun Ġsetup () Ġ{ ĊĠĠĠĠĠĠĠ Ġcov id Tracker Dao Ġ= Ġdatabase . covid Tracker Dao () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġget World And Countries Stats By Last Date _ should Return Po jo () Ġ= Ġrun Blocking Ġ{ ĊĠĠĠĠĠĠĠ Ġcov id Tracker Dao . get World And Countries Stats By Last Date (). take ( 1 ). collect Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( it ). isEqualTo ( world And Countries Stats Po jo ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġget World And Countries Stats By Date _ should Return Po jo () Ġ= Ġrun Blocking Ġ{ ĊĠĠĠĠĠĠĠ Ġcov id Tracker Dao . get World And Countries Stats By Date ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġworld And Countries Stats Po jo . world Stats !!. date Timestamp ĊĠĠĠĠĠĠĠ Ġ). take ( 1 ). collect Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( it ). isEqualTo ( world And Countries Stats Po jo ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }