package Ġorg . simple . clin ic . sync Ċ Ċ import Ġcom . google . common . truth . Truth . assertThat Ċ import Ġorg . junit . After Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . rules . Rule Chain Ċ import Ġorg . simple . clin ic . Test Clin ic App Ċ import Ġorg . simple . clin ic . reports . Reports Repository Ċ import Ġorg . simple . clin ic . reports . Reports Repository . Companion . REPORT S _ KEY Ċ import Ġorg . simple . clin ic . reports . Reports Sync Ċ import Ġorg . simple . clin ic . rules . Save Database Rule Ċ import Ġorg . simple . clin ic . rules . Server Authentication Rule Ċ import Ġorg . simple . clin ic . storage . text . Text Store Ċ import Ġorg . simple . shared Test Code . util . Rules Ċ import Ġjavax . inject . Inject ĊĊ Ċ class ĠReports Sync IntegrationTest Ġ{ ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġreports Repository : ĠReports Repository ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġreports Sync : ĠReports Sync ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġtext Store : ĠText Store ĊĊĠ Ġ@ get : Rule ĊĠ Ġval Ġrule Chain : ĠRule Chain Ġ= ĠRules ĊĠĠĠĠĠ Ġ. global () ĊĠĠĠĠĠ Ġ. around ( Server Authentication Rule ()) ĊĠĠĠĠĠ Ġ. around ( Save Database Rule ()) ĊĊĠ Ġ@ Before ĊĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠ ĠTest Clin ic App . app Component (). inject ( this ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġwhen _ pull ing _ reports _ from _ the _ server _ it _ should _ save _ the _ reports _ as _ a _ file () Ġ{ ĊĠĠĠ Ġtext Store . delete ( REPORT S _ KEY ) ĊĠĠĠ ĠassertThat ( text Store . get ( REPORT S _ KEY )). isNull () ĊĊĠĠĠ Ġreports Sync . pull () ĊĊĠĠĠ ĠassertThat ( text Store . get ( REPORT S _ KEY )). isNotEmpty () ĊĠ Ġ} Ċ } Ċ