diff options
author | Jakob Odersky <jakob@driver.xyz> | 2017-11-20 20:41:50 -0800 |
---|---|---|
committer | Jakob Odersky <jakob@driver.xyz> | 2017-11-20 20:47:35 -0800 |
commit | 92df74ed76b7a06dbe1405fc496f3f650709e75f (patch) | |
tree | fbef129d0bee9a3e23cb3e9d5fbdbd77f1484e87 /src/test/scala/xyz/driver/pdsuidomain/formats/json | |
parent | 38a00385d1b11046cd33384e61ad59958f474c88 (diff) | |
download | rest-query-92df74ed76b7a06dbe1405fc496f3f650709e75f.tar.gz rest-query-92df74ed76b7a06dbe1405fc496f3f650709e75f.tar.bz2 rest-query-92df74ed76b7a06dbe1405fc496f3f650709e75f.zip |
Add formats for patient eligible trials
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json')
-rw-r--r-- | src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientEligibleTrialFormatSuite.scala | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientEligibleTrialFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientEligibleTrialFormatSuite.scala index faef0f6..0a83c62 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientEligibleTrialFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientEligibleTrialFormatSuite.scala @@ -47,11 +47,17 @@ class PatientEligibleTrialFormatSuite extends FlatSpec with Matchers { PatientCriterionArm(patientCriterionId = LongId(1), armId = LongId(32), armName = "arm 32") ) val orig = RichPatientEligibleTrial(trial, group, arms) - val writtenJson = patientEligibleTrialWriter.write(orig) + val writtenJson = patientEligibleTrialFormat.write(orig) writtenJson should be( - """{"id":1,"patientId":"748b5884-3528-4cb9-904b-7a8151d6e343","trialId":"NCT000001","trialTitle":"trial title", - "hypothesisId":"e76e2fc4-a29c-44fb-a81b-8856d06bb1d4","verifiedEligibilityStatus":"Yes","isVerified":false,"arms":["arm 31","arm 32"]}""".parseJson) + """{"trial":{"isPartner":false,"assignee":null,"lastUpdate":"2017-08-10T18:16:19Z","previousStatus":null, + "isUpdated":false,"overviewTemplate":"","phase":"","originalStudyDesignId":null, + "hypothesisId":"e76e2fc4-a29c-44fb-a81b-8856d06bb1d4","originalTitle":"orig trial title","studyDesignId":321, + "lastActiveUser":null,"externalid":"40892a07-c638-49d2-9795-1edfefbbcc7c","id":"NCT000001","status":"Done", + "overview":null,"previousAssignee":null,"title":"trial title"},"group":{"isVerified":false + ,"patientId":"748b5884-3528-4cb9-904b-7a8151d6e343","hypothesisId":"e76e2fc4-a29c-44fb-a81b-8856d06bb1d4", + "verifiedEligibilityStatus":"Yes","trialId":"NCT000001","eligibilityStatus":"Yes","id":1}, + "arms":[{"patientCriterionId":1,"armId":31,"armName":"arm 31"},{"patientCriterionId":1,"armId":32,"armName":"arm 32"}]}""".parseJson) val updatePatientEligibleTrialJson = """{"isVerified":true}""".parseJson val expectedUpdatedPatientTrialArmGroup = group.copy(isVerified = true) |