From dfdb1c689615ab79bafa4e904dc61a15db3bbffe Mon Sep 17 00:00:00 2001 From: Kseniya Tomskikh Date: Fri, 10 Nov 2017 20:48:44 +0700 Subject: Fixed calculation of eligibility status with "Unknown" value (instead of NULL) --- .../pdsuidomain/formats/json/PatientLabelFormatSuite.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala') diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala index b83aad1..289de53 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala @@ -17,8 +17,8 @@ class PatientLabelFormatSuite extends FlatSpec with Matchers { id = LongId(1), patientId = UuidId("748b5884-3528-4cb9-904b-7a8151d6e343"), labelId = LongId(20), - primaryValue = Some(LabelValue.Yes), - verifiedPrimaryValue = None, + primaryValue = LabelValue.Yes, + verifiedPrimaryValue = LabelValue.Unknown, isVisible = true, score = 1, isImplicitMatch = false @@ -26,11 +26,11 @@ class PatientLabelFormatSuite extends FlatSpec with Matchers { val writtenJson = richPatientLabelFormat.write(RichPatientLabel(orig, isVerified = true)) writtenJson should be( - """{"id":1,"labelId":20,"primaryValue":"Yes","isVisible":true,"isVerified":true, + """{"id":1,"labelId":20,"primaryValue":"Yes","isVisible":true,"isVerified":true,"verifiedPrimaryValue":"Unknown", "score":1,"isImplicitMatch":false, "patientId":"748b5884-3528-4cb9-904b-7a8151d6e343"}""".parseJson) val updatePatientLabelJson = """{"verifiedPrimaryValue":"No"}""".parseJson - val expectedUpdatedPatientLabel = orig.copy(verifiedPrimaryValue = Some(LabelValue.No)) + val expectedUpdatedPatientLabel = orig.copy(verifiedPrimaryValue = LabelValue.No) val parsedUpdatePatientLabel = applyUpdateToPatientLabel(updatePatientLabelJson, orig) parsedUpdatePatientLabel should be(expectedUpdatedPatientLabel) } @@ -65,8 +65,8 @@ class PatientLabelFormatSuite extends FlatSpec with Matchers { id = LongId(1), patientId = UuidId("748b5884-3528-4cb9-904b-7a8151d6e343"), labelId = LongId(20), - primaryValue = Some(LabelValue.Yes), - verifiedPrimaryValue = Some(LabelValue.Yes), + primaryValue = LabelValue.Yes, + verifiedPrimaryValue = LabelValue.Yes, isVisible = true, score = 1, isImplicitMatch = false -- cgit v1.2.3