diff options
author | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-10-11 16:56:06 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 16:56:06 +0700 |
commit | 3375f1beeab7af9a6732d6fce8762c3a3038e1f3 (patch) | |
tree | e4f1ad85a2ea17c76bcc844420d5f97bfd116e23 /src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala | |
parent | bbbcaf35a6081dba24dbb9a9aeb9d25fc2ca60be (diff) | |
parent | 85c78f58f0428d13795aa0419ff42471513a34d6 (diff) | |
download | rest-query-3375f1beeab7af9a6732d6fce8762c3a3038e1f3.tar.gz rest-query-3375f1beeab7af9a6732d6fce8762c3a3038e1f3.tar.bz2 rest-query-3375f1beeab7af9a6732d6fce8762c3a3038e1f3.zip |
Merge pull request #37 from drivergroup/add-slot-eligibility-armsv0.8.1
Add slot eligibility arms
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala')
-rw-r--r-- | src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala index beb69c4..c9dc85f 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala @@ -2,9 +2,8 @@ package xyz.driver.pdsuidomain.formats.json.sprayformats import java.time.LocalDateTime -import spray.json._ import org.scalatest.{FlatSpec, Matchers} -import xyz.driver.entities.patient.CancerType +import spray.json._ import xyz.driver.pdsuicommon.domain.{LongId, StringId, UuidId} import xyz.driver.pdsuidomain.entities.Trial @@ -21,7 +20,6 @@ class TrialFormatSuite extends FlatSpec with Matchers { previousAssignee = None, lastActiveUserId = None, lastUpdate = LocalDateTime.parse("2017-08-10T18:16:19"), - disease = CancerType.Breast, phase = "", hypothesisId = Some(UuidId("3b80b2e2-5372-4cf5-a342-6e4ebe10fafd")), studyDesignId = Some(LongId(321)), @@ -35,16 +33,16 @@ class TrialFormatSuite extends FlatSpec with Matchers { ) val writtenJson = trialWriter.write(orig) - writtenJson should be ( + writtenJson should be( """{"isPartner":false,"assignee":null,"lastUpdate":"2017-08-10T18:16:19Z","previousStatus":null, "isUpdated":false,"overviewTemplate":"","phase":"","originalStudyDesignId":null, "hypothesisId":"3b80b2e2-5372-4cf5-a342-6e4ebe10fafd","originalTitle":"orig trial title", "studyDesignId":321,"lastActiveUser":null,"externalid":"40892a07-c638-49d2-9795-1edfefbbcc7c", - "id":"NCT000001","disease":"Breast","status":"New","overview":null,"previousAssignee":null,"title":"trial title"}""".parseJson) + "id":"NCT000001","status":"New","overview":null,"previousAssignee":null,"title":"trial title"}""".parseJson) - val updateTrialJson = """{"hypothesisId":null,"overview":"new overview"}""".parseJson + val updateTrialJson = """{"hypothesisId":null,"overview":"new overview"}""".parseJson val expectedUpdatedTrial = orig.copy(hypothesisId = None, overview = Some("new overview")) - val parsedUpdateTrial = applyUpdateToTrial(updateTrialJson, orig) + val parsedUpdateTrial = applyUpdateToTrial(updateTrialJson, orig) parsedUpdateTrial should be(expectedUpdatedTrial) } |