diff options
author | Jakob Odersky <jakob@driver.xyz> | 2017-10-30 15:41:06 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@driver.xyz> | 2017-10-30 16:14:04 -0700 |
commit | 91b33aaeb61160da4395e6093e23a947688e12c5 (patch) | |
tree | 5ee0ed63ac16d8fc96d372082c745078fbab96c4 /src/test/scala/xyz/driver/pdsuidomain/formats | |
parent | 344996ef6d19551d7cbff717ada35718afcf346a (diff) | |
download | rest-query-91b33aaeb61160da4395e6093e23a947688e12c5.tar.gz rest-query-91b33aaeb61160da4395e6093e23a947688e12c5.tar.bz2 rest-query-91b33aaeb61160da4395e6093e23a947688e12c5.zip |
Add REST implementation of RestPatientCriterionService
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats')
-rw-r--r-- | src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientCriterionFormatSuite.scala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientCriterionFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientCriterionFormatSuite.scala index 93284d9..e0f96bb 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientCriterionFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientCriterionFormatSuite.scala @@ -34,12 +34,14 @@ class PatientCriterionFormatSuite extends FlatSpec with Matchers { PatientCriterionArm(patientCriterionId = LongId(1), armId = LongId(32), armName = "arm 32") ) val richPatientCriterion = RichPatientCriterion(orig, LongId(21), arms) - val writtenJson = patientCriterionWriter.write(richPatientCriterion) + val writtenJson = richPatientCriterionFormat.write(richPatientCriterion) writtenJson should be( - """{"id":1,"labelId":21,"nctId":"NCT00001","criterionId":101,"criterionText":"criterion text","criterionValue":"Yes", - "criterionIsDefining":false,"criterionIsCompound":false,"eligibilityStatus":"Yes","verifiedEligibilityStatus":null, - "isVisible":true,"isVerified":true,"lastUpdate":"2017-08-10T18:00Z","arms":["arm 31","arm 32"],"inclusion":true}""".parseJson) + """{"isVerified":true,"patientLabelId":1,"lastUpdate":"2017-08-10T18:00Z","trialId":0, + "armList":[{"patientCriterionId":1,"armId":31,"armName":"arm 31"},{"patientCriterionId":1, + "armId":32,"armName":"arm 32"}],"eligibilityStatus":"Yes","id":1,"nctId":"NCT00001", + "criterionId":101,"criterionValue":true,"criterionIsDefining":false,"labelId":21, + "isVisible":true,"criterionText":"criterion text","inclusion":true}""".parseJson) val updatePatientCriterionJson = """{"verifiedEligibilityStatus":"No"}""".parseJson val expectedUpdatedPatientCriterion = orig.copy(verifiedEligibilityStatus = Some(LabelValue.No)) |