diff options
author | vlad <vlad@driver.xyz> | 2017-10-30 14:21:55 -0700 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-10-30 14:21:55 -0700 |
commit | 78f467dd0b3b9f35bb49ae973b26fb37c458b138 (patch) | |
tree | e45ec25c7d914bed07774d862d59fdaa56fd6d60 /src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientHypothesisFormatSuite.scala | |
parent | 604fbf0a7a082bc440c0778abd6f90005b210c16 (diff) | |
download | rest-query-78f467dd0b3b9f35bb49ae973b26fb37c458b138.tar.gz rest-query-78f467dd0b3b9f35bb49ae973b26fb37c458b138.tar.bz2 rest-query-78f467dd0b3b9f35bb49ae973b26fb37c458b138.zip |
Fixing Patients and Trials parsing, some refined to tryv0.11.1
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientHypothesisFormatSuite.scala')
-rw-r--r-- | src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientHypothesisFormatSuite.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientHypothesisFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientHypothesisFormatSuite.scala index 270a04d..7ff1109 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientHypothesisFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientHypothesisFormatSuite.scala @@ -1,10 +1,12 @@ package xyz.driver.pdsuidomain.formats.json +import eu.timepit.refined.numeric.NonNegative import spray.json._ import org.scalatest.{FlatSpec, Matchers} import xyz.driver.pdsuicommon.domain.UuidId import xyz.driver.pdsuidomain.entities.PatientHypothesis import xyz.driver.pdsuidomain.services.PatientHypothesisService.RichPatientHypothesis +import eu.timepit.refined.refineMV class PatientHypothesisFormatSuite extends FlatSpec with Matchers { import xyz.driver.pdsuidomain.formats.json.patienthypothesis._ @@ -15,7 +17,7 @@ class PatientHypothesisFormatSuite extends FlatSpec with Matchers { patientId = UuidId("748b5884-3528-4cb9-904b-7a8151d6e343"), hypothesisId = UuidId("e76e2fc4-a29c-44fb-a81b-8856d06bb1d4"), rationale = None, - matchedTrials = 1 + matchedTrials = refineMV[NonNegative](1) ) val writtenJson = richPatientHypothesisWriter.write(RichPatientHypothesis(orig, isRequired = true)) @@ -35,7 +37,7 @@ class PatientHypothesisFormatSuite extends FlatSpec with Matchers { patientId = UuidId("748b5884-3528-4cb9-904b-7a8151d6e343"), hypothesisId = UuidId("e76e2fc4-a29c-44fb-a81b-8856d06bb1d4"), rationale = None, - matchedTrials = 1 + matchedTrials = refineMV[NonNegative](1) ) val writtenJson = patientHypothesisWriter.write(orig) |