diff options
author | Aleksandr <ognelisar@gmail.com> | 2017-10-12 10:44:54 +0700 |
---|---|---|
committer | Aleksandr <ognelisar@gmail.com> | 2017-10-12 10:44:54 +0700 |
commit | f525ab2604cc5d1366c852bdbcb4d912bbcea800 (patch) | |
tree | 4fe4b35e1f474e2dc85a8885dc4c9002f3ea46c2 /src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala | |
parent | 9198729ebf3d20b650b4467daa0d484a3148f01c (diff) | |
parent | e15415d69ec990d5243e58704e232e619b80aa6f (diff) | |
download | rest-query-f525ab2604cc5d1366c852bdbcb4d912bbcea800.tar.gz rest-query-f525ab2604cc5d1366c852bdbcb4d912bbcea800.tar.bz2 rest-query-f525ab2604cc5d1366c852bdbcb4d912bbcea800.zip |
All merge conflicts are resolved
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala')
-rw-r--r-- | src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala index 31f541f..b8f6f8e 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala @@ -2,10 +2,9 @@ package xyz.driver.pdsuidomain.formats.json.sprayformats import java.time.LocalDateTime -import spray.json._ import org.scalatest.{FlatSpec, Matchers} +import spray.json._ import xyz.driver.entities.labels.LabelValue -import xyz.driver.entities.patient.CancerType import xyz.driver.pdsuicommon.domain.{LongId, StringId, UuidId} import xyz.driver.pdsuidomain.entities.{PatientCriterionArm, PatientTrialArmGroupView, Trial} import xyz.driver.pdsuidomain.services.PatientEligibleTrialService.RichPatientEligibleTrial @@ -23,7 +22,6 @@ class PatientEligibleTrialFormatSuite extends FlatSpec with Matchers { previousAssignee = None, lastActiveUserId = None, lastUpdate = LocalDateTime.parse("2017-08-10T18:16:19"), - disease = CancerType.Breast, phase = "", hypothesisId = Some(UuidId("e76e2fc4-a29c-44fb-a81b-8856d06bb1d4")), studyDesignId = Some(LongId(321)), @@ -48,16 +46,16 @@ class PatientEligibleTrialFormatSuite extends FlatSpec with Matchers { PatientCriterionArm(patientCriterionId = LongId(1), armId = LongId(31), armName = "arm 31"), PatientCriterionArm(patientCriterionId = LongId(1), armId = LongId(32), armName = "arm 32") ) - val orig = RichPatientEligibleTrial(trial, group, arms) + val orig = RichPatientEligibleTrial(trial, group, arms) val writtenJson = patientEligibleTrialWriter.write(orig) - writtenJson should be ( + 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) - val updatePatientEligibleTrialJson = """{"isVerified":true}""".parseJson + val updatePatientEligibleTrialJson = """{"isVerified":true}""".parseJson val expectedUpdatedPatientTrialArmGroup = group.copy(isVerified = true) - val parsedUpdatePatientTrialArmGroup = applyUpdateToTrialArmGroup(updatePatientEligibleTrialJson, group) + val parsedUpdatePatientTrialArmGroup = applyUpdateToTrialArmGroup(updatePatientEligibleTrialJson, group) parsedUpdatePatientTrialArmGroup should be(expectedUpdatedPatientTrialArmGroup) } |