aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala
diff options
context:
space:
mode:
authorMarvin Bertin <marvin.bertin@gmail.com>2017-10-10 11:54:20 -0700
committerMarvin Bertin <marvin.bertin@gmail.com>2017-10-10 11:54:20 -0700
commit19a70318ecee81872fffe23c03d83e725610911d (patch)
tree984510310c95856fcdcb463d9a242f9773795266 /src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala
parent05aa114cfd22228f0457b6457ce441af5eabfc60 (diff)
parent4f83461cba1f78e607ca2a4edb6fa26f6e16e732 (diff)
downloadrest-query-19a70318ecee81872fffe23c03d83e725610911d.tar.gz
rest-query-19a70318ecee81872fffe23c03d83e725610911d.tar.bz2
rest-query-19a70318ecee81872fffe23c03d83e725610911d.zip
fix merge conflicts with master
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.scala17
1 files changed, 9 insertions, 8 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 8b00883..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,9 +2,10 @@ package xyz.driver.pdsuidomain.formats.json.sprayformats
import java.time.LocalDateTime
-import spray.json._
import org.scalatest.{FlatSpec, Matchers}
-import xyz.driver.pdsuicommon.domain.{FuzzyValue, LongId, StringId, UuidId}
+import spray.json._
+import xyz.driver.entities.labels.LabelValue
+import xyz.driver.pdsuicommon.domain.{LongId, StringId, UuidId}
import xyz.driver.pdsuidomain.entities.{PatientCriterionArm, PatientTrialArmGroupView, Trial}
import xyz.driver.pdsuidomain.services.PatientEligibleTrialService.RichPatientEligibleTrial
@@ -37,24 +38,24 @@ class PatientEligibleTrialFormatSuite extends FlatSpec with Matchers {
patientId = UuidId("748b5884-3528-4cb9-904b-7a8151d6e343"),
trialId = StringId("NCT000001"),
hypothesisId = UuidId("e76e2fc4-a29c-44fb-a81b-8856d06bb1d4"),
- eligibilityStatus = Some(FuzzyValue.Yes),
- verifiedEligibilityStatus = Some(FuzzyValue.Yes),
+ eligibilityStatus = Some(LabelValue.Yes),
+ verifiedEligibilityStatus = Some(LabelValue.Yes),
isVerified = false
)
val arms = List(
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)
}