diff options
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain')
3 files changed, 10 insertions, 10 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentIssueFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentIssueFormatSuite.scala index 1a8e3f0..c4c9f7c 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentIssueFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentIssueFormatSuite.scala @@ -22,10 +22,10 @@ class DocumentIssueFormatSuite extends FlatSpec with Matchers { startPage = Some(1.0), endPage = Some(2.0) ) - val writtenJson = documentIssueWriter.write(documentIssue) + val writtenJson = documentIssueFormat.write(documentIssue) writtenJson should be( - """{"id":10,"userId":"userId-001","lastUpdate":"2017-08-10T18:00Z","isDraft":false, + """{"id":10,"userId":"userId-001","documentId":1,"lastUpdate":"2017-08-10T18:00Z","isDraft":false, "text":"message text","archiveRequired":false,"startPage":1.0,"endPage":2.0}""".parseJson) val createDocumentIssueJson = """{"text":"message text","startPage":1.0,"endPage":2.0}""".parseJson diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/InterventionFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/InterventionFormatSuite.scala index 784a655..0f01d4a 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/InterventionFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/InterventionFormatSuite.scala @@ -16,8 +16,8 @@ class InterventionFormatSuite extends FlatSpec with Matchers { originalName = "orig name", typeId = Some(LongId(10)), originalType = Some("orig type"), - description = "", - originalDescription = "", + dosage = "", + originalDosage = "", isActive = true ) val arms = List( @@ -32,12 +32,12 @@ class InterventionFormatSuite extends FlatSpec with Matchers { val writtenJson = interventionWriter.write(orig) writtenJson should be( - """{"id":1,"name":"intervention name","typeId":10,"description":"","isActive":true,"arms":[20,21,22], - "trialId":"NCT000001","originalName":"orig name","originalDescription":"","originalType":"orig type"}""".parseJson) + """{"id":1,"name":"intervention name","typeId":10,"dosage":"","isActive":true,"arms":[20,21,22], + "trialId":"NCT000001","originalName":"orig name","originalDosage":"","originalType":"orig type"}""".parseJson) - val updateInterventionJson = """{"description":"descr","arms":[21,22]}""".parseJson + val updateInterventionJson = """{"dosage":"descr","arms":[21,22]}""".parseJson val expectedUpdatedIntervention = orig.copy( - intervention = intervention.copy(description = "descr"), + intervention = intervention.copy(dosage = "descr"), arms = List( InterventionArm(interventionId = intervention.id, armId = LongId(21)), InterventionArm(interventionId = intervention.id, armId = LongId(22)) diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/MedicalRecordIssueFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/MedicalRecordIssueFormatSuite.scala index 9b89c97..c23ca37 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/MedicalRecordIssueFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/MedicalRecordIssueFormatSuite.scala @@ -22,10 +22,10 @@ class MedicalRecordIssueFormatSuite extends FlatSpec with Matchers { startPage = Some(1.0), endPage = Some(2.0) ) - val writtenJson = recordIssueWriter.write(recordIssue) + val writtenJson = recordIssueFormat.write(recordIssue) writtenJson should be( - """{"id":10,"userId":"userId-001","lastUpdate":"2017-08-10T18:00Z","isDraft":false, + """{"id":10,"recordId":1,"userId":"userId-001","lastUpdate":"2017-08-10T18:00Z","isDraft":false, "text":"message text","archiveRequired":false,"startPage":1.0,"endPage":2.0}""".parseJson) val createRecordIssueJson = """{"text":"message text","startPage":1.0,"endPage":2.0}""".parseJson |