package Ġorg . simple . clin ic . home . over due Ċ Ċ import Ġandroidx . paging . Paging Data Ċ import Ġcom . spotify . mob ius . test . Next Matchers . has Effects Ċ import Ġcom . spotify . mob ius . test . Next Matchers . has Model Ċ import Ġcom . spotify . mob ius . test . Next Matchers . has No Model Ċ import Ġcom . spotify . mob ius . test . Update Spec Ċ import Ġcom . spotify . mob ius . test . Update Spec . assertThat Next Ċ import Ġorg . junit . Test Ċ import Ġorg . simple . clin ic . TestData Ċ import Ġorg . simple . clin ic . analytics . Network Connectivity Status . ACTIVE Ċ import Ġorg . simple . clin ic . analytics . Network Connectivity Status . IN ACTIVE Ċ import Ġorg . simple . clin ic . facility . Facility Config Ċ import Ġorg . simple . clin ic . over due . download . Over due List File Format . CSV Ċ import Ġjava . time . LocalDate Ċ import Ġjava . util . Optional Ċ import Ġjava . util . UUID Ċ Ċ class ĠOver due Update Test Ġ{ ĊĊĠ Ġprivate Ġval Ġdate On Clock Ġ= ĠLocalDate . parse (" 2 0 1 8 - 0 1 - 0 1 ") ĊĠ Ġprivate Ġval Ġupdate Spec Ġ= ĠUpdate Spec ( Over due Update ( date Ġ= Ġdate On Clock , Ġcan Generate Pdf Ġ= Ġtrue )) ĊĠ Ġprivate Ġval Ġdefault Model Ġ= ĠOver due Model . create () ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` when Ġover due Ġpatient Ġis Ġclicked , Ġthen Ġopen Ġpatient Ġsummary Ġscreen `() Ġ{ ĊĠĠĠ Ġval Ġpatient Uuid Ġ= ĠUUID . fromString (" 1 2 1 1 bce 0 - 0 b 5 d - 4 2 0 3 - b 5 e 3 - 0 0 4 7 0 9 0 5 9 eca ") ĊĊĠĠĠ Ġupdate Spec ĊĠĠĠĠĠĠĠ Ġ. given ( default Model ) ĊĠĠĠĠĠĠĠ Ġ. when Event ( Over due Patient Clicked ( patient Uuid )) ĊĠĠĠĠĠĠĠ Ġ. then ( assertThat Next ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas No Model (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Effects ( Open Patient Summary ( patient Uuid )) ĊĠĠĠĠĠĠĠ Ġ)) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` when Ġover due Ġapp ointments Ġare Ġloaded , Ġthen Ġshow Ġover due Ġapp ointments `() Ġ{ ĊĠĠĠ Ġval Ġover due App ointments Ġ= ĠP aging Data . from ( listOf ( ĊĠĠĠĠĠĠĠ ĠTest Data . over due Appointment ( appointment Uuid Ġ= ĠUUID . fromString (" 4 e 4 ba eba - 3 a 8 e - 4 4 5 3 - ace 1 - d 3 1 4 9 0 8 8 aef c ")), ĊĠĠĠĠĠĠĠ ĠTest Data . over due Appointment ( appointment Uuid Ġ= ĠUUID . fromString (" 7 9 c 4 bda 9 - 5 0 cf - 4 4 8 4 - 8 a 2 a - c 5 3 3 6 ce 8 af 8 4 ")) ĊĠĠĠ Ġ)) ĊĠĠĠ Ġval Ġfacility Ġ= ĠTest Data . facility ( ĊĠĠĠĠĠĠĠ Ġuuid Ġ= ĠUUID . fromString (" 6 d 6 6 fda 7 - 7 ca 6 - 4 4 3 1 - ac 3 b - b 5 7 0 f 1 1 2 3 6 2 4 "), ĊĠĠĠĠĠĠĠ Ġfacility Config Ġ= ĠFac ility Config ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdi abet es Management Enabled Ġ= Ġtrue , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtele consult ation Enabled Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġfacility Loaded Model Ġ= Ġdefault Model ĊĠĠĠĠĠĠĠ Ġ. current Facility Loaded ( facility ) ĊĊĠĠĠ Ġupdate Spec ĊĠĠĠĠĠĠĠ Ġ. given ( facility Loaded Model ) ĊĠĠĠĠĠĠĠ Ġ. when Event ( Over due App ointments Loaded ( over due App ointments )) ĊĠĠĠĠĠĠĠ Ġ. then ( assertThat Next ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas No Model (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Effects ( Show Over due App ointments ( over due App ointments , Ġis Di abet es Management Enabled Ġ= Ġtrue )) ĊĠĠĠĠĠĠĠ Ġ)) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` when Ġcurrent Ġfacility Ġis Ġloaded Ġand Ġover due Ġlist Ġchanges Ġfeature Ġis Ġenabled , Ġthen Ġload Ġover due Ġapp ointments Ġwith Ġpatients Ġwith Ġno Ġphone Ġnumbers `() Ġ{ ĊĠĠĠ Ġval Ġfacility Ġ= ĠTest Data . facility ( ĊĠĠĠĠĠĠĠ Ġuuid Ġ= ĠUUID . fromString (" 6 d 6 6 fda 7 - 7 ca 6 - 4 4 3 1 - ac 3 b - b 5 7 0 f 1 1 2 3 6 2 4 "), ĊĠĠĠĠĠĠĠ Ġfacility Config Ġ= ĠFac ility Config ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdi abet es Management Enabled Ġ= Ġtrue , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtele consult ation Enabled Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġupdate Spec ĊĠĠĠĠĠĠĠ Ġ. given ( default Model ) ĊĠĠĠĠĠĠĠ Ġ. when Event ( Current Facility Loaded ( facility )) ĊĠĠĠĠĠĠĠ Ġ. then ( assertThat Next ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Model ( default Model . current Facility Loaded ( facility )), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Effects ( Load Over due App ointments ( date On Clock , Ġfacility )) ĊĠĠĠĠĠĠĠ Ġ)) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` when Ġdownload Ġover due Ġlist Ġbutton Ġis Ġclicked Ġand Ġnetwork Ġis Ġnot Ġconnected , Ġthen Ġshow Ġno Ġactive Ġconnection Ġdialog `() Ġ{ ĊĠĠĠ Ġupdate Spec ĊĠĠĠĠĠĠĠ Ġ. given ( default Model ) ĊĠĠĠĠĠĠĠ Ġ. when Event ( Download Over due List Clicked ( network Status Ġ= ĠOptional . of ( IN ACTIVE ))) ĊĠĠĠĠĠĠĠ Ġ. then ( assertThat Next ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas No Model (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Effects ( Show No Active Network Connection Dialog ) ĊĠĠĠĠĠĠĠ Ġ)) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` when Ġdownload Ġover due Ġlist Ġbutton Ġis Ġclicked , Ġnetwork Ġis Ġconnected Ġand Ġpdf Ġcan Ġbe Ġgenerated , Ġthen Ġopen Ġselect Ġdownload Ġformat Ġdialog `() Ġ{ ĊĠĠĠ Ġupdate Spec ĊĠĠĠĠĠĠĠ Ġ. given ( default Model ) ĊĠĠĠĠĠĠĠ Ġ. when Event ( Download Over due List Clicked ( network Status Ġ= ĠOptional . of ( ACTIVE ))) ĊĠĠĠĠĠĠĠ Ġ. then ( assertThat Next ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas No Model (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Effects ( Open Select Download Format Dialog ) ĊĠĠĠĠĠĠĠ Ġ)) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` when Ġdownload Ġover due Ġlist Ġbutton Ġis Ġclicked , Ġnetwork Ġis Ġconnected Ġand Ġpdf Ġcan Ġnot Ġbe Ġgenerated , Ġthen Ġschedule Ġdownload `() Ġ{ ĊĠĠĠ Ġval Ġupdate Spec Ġ= ĠUpdate Spec ( Over due Update ( date Ġ= Ġdate On Clock , Ġcan Generate Pdf Ġ= Ġfalse )) ĊĊĠĠĠ Ġupdate Spec ĊĠĠĠĠĠĠĠ Ġ. given ( default Model ) ĊĠĠĠĠĠĠĠ Ġ. when Event ( Download Over due List Clicked ( network Status Ġ= ĠOptional . of ( ACTIVE ))) ĊĠĠĠĠĠĠĠ Ġ. then ( assertThat Next ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas No Model (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Effects ( Schedule Download ( CSV )) ĊĠĠĠĠĠĠĠ Ġ)) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` when Ġshare Ġover due Ġlist Ġbutton Ġis Ġclicked Ġand Ġnetwork Ġis Ġnot Ġconnected , Ġthen Ġshow Ġno Ġactive Ġconnection Ġdialog `() Ġ{ ĊĠĠĠ Ġupdate Spec ĊĠĠĠĠĠĠĠ Ġ. given ( default Model ) ĊĠĠĠĠĠĠĠ Ġ. when Event ( Share Over due List Clicked ( network Status Ġ= ĠOptional . of ( IN ACTIVE ))) ĊĠĠĠĠĠĠĠ Ġ. then ( assertThat Next ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas No Model (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Effects ( Show No Active Network Connection Dialog ) ĊĠĠĠĠĠĠĠ Ġ)) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` when Ġshare Ġover due Ġlist Ġbutton Ġis Ġclicked , Ġnetwork Ġis Ġconnected Ġand Ġpdf Ġcan Ġbe Ġgenerated , Ġthen Ġopen Ġselect Ġshare Ġformat Ġdialog `() Ġ{ ĊĠĠĠ Ġupdate Spec ĊĠĠĠĠĠĠĠ Ġ. given ( default Model ) ĊĠĠĠĠĠĠĠ Ġ. when Event ( Share Over due List Clicked ( network Status Ġ= ĠOptional . of ( ACTIVE ))) ĊĠĠĠĠĠĠĠ Ġ. then ( assertThat Next ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas No Model (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Effects ( Open Select Share Format Dialog ) ĊĠĠĠĠĠĠĠ Ġ)) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` when Ġshare Ġover due Ġlist Ġbutton Ġis Ġclicked , Ġnetwork Ġis Ġconnected Ġbut Ġpdf Ġcan Ġnot Ġbe Ġgenerated , Ġthen Ġopen Ġprogress Ġfor Ġshare Ġdialog `() Ġ{ ĊĠĠĠ Ġval Ġupdate Spec Ġ= ĠUpdate Spec ( Over due Update ( date Ġ= Ġdate On Clock , Ġcan Generate Pdf Ġ= Ġfalse )) ĊĊĠĠĠ Ġupdate Spec ĊĠĠĠĠĠĠĠ Ġ. given ( default Model ) ĊĠĠĠĠĠĠĠ Ġ. when Event ( Share Over due List Clicked ( network Status Ġ= ĠOptional . of ( ACTIVE ))) ĊĠĠĠĠĠĠĠ Ġ. then ( assertThat Next ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas No Model (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Effects ( Open Sharing InProgress Dialog ) ĊĠĠĠĠĠĠĠ Ġ)) ĊĠ Ġ} Ċ } Ċ