diff options
author | vlad <vlad@driver.xyz> | 2017-11-02 17:37:25 -0700 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-11-02 17:37:25 -0700 |
commit | 5515c834853cbe3ce60460a4819a94805cfe24f7 (patch) | |
tree | 13a0a8a51f477a4fce2bb8f4d5cd8248de54a73b /src/test/scala/xyz/driver/pdsuidomain/formats | |
parent | b331892f87846945f69a28e9f3ee786cd4b93577 (diff) | |
download | rest-query-5515c834853cbe3ce60460a4819a94805cfe24f7.tar.gz rest-query-5515c834853cbe3ce60460a4819a94805cfe24f7.tar.bz2 rest-query-5515c834853cbe3ce60460a4819a94805cfe24f7.zip |
Unifying user ids
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats')
8 files changed, 23 insertions, 23 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/DocumentHistoryFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/DocumentHistoryFormatSuite.scala index e4a0733..4dc4d00 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/DocumentHistoryFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/DocumentHistoryFormatSuite.scala @@ -2,9 +2,9 @@ package xyz.driver.pdsuidomain.formats.json import java.time.LocalDateTime -import spray.json._ import org.scalatest.{FlatSpec, Matchers} -import xyz.driver.pdsuicommon.domain.{LongId, StringId} +import spray.json._ +import xyz.driver.pdsuicommon.domain.LongId import xyz.driver.pdsuidomain.entities.DocumentHistory class DocumentHistoryFormatSuite extends FlatSpec with Matchers { @@ -14,7 +14,7 @@ class DocumentHistoryFormatSuite extends FlatSpec with Matchers { val documentHistory = DocumentHistory( id = LongId(10), documentId = LongId(1), - executor = StringId("userId-001"), + executor = xyz.driver.core.Id("userId-001"), state = DocumentHistory.State.Extract, action = DocumentHistory.Action.Start, created = LocalDateTime.parse("2017-08-10T18:00:00") diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/DocumentIssueFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/DocumentIssueFormatSuite.scala index 7f34725..2ddd5e7 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/DocumentIssueFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/DocumentIssueFormatSuite.scala @@ -2,9 +2,9 @@ package xyz.driver.pdsuidomain.formats.json import java.time.LocalDateTime -import spray.json._ import org.scalatest.{FlatSpec, Matchers} -import xyz.driver.pdsuicommon.domain.{LongId, StringId} +import spray.json._ +import xyz.driver.pdsuicommon.domain.LongId import xyz.driver.pdsuidomain.entities.DocumentIssue class DocumentIssueFormatSuite extends FlatSpec with Matchers { @@ -14,7 +14,7 @@ class DocumentIssueFormatSuite extends FlatSpec with Matchers { val documentIssue = DocumentIssue( id = LongId(10), documentId = LongId(1), - userId = StringId("userId-001"), + userId = xyz.driver.core.Id("userId-001"), lastUpdate = LocalDateTime.parse("2017-08-10T18:00:00"), isDraft = false, text = "message text", @@ -31,7 +31,7 @@ class DocumentIssueFormatSuite extends FlatSpec with Matchers { val createDocumentIssueJson = """{"text":"message text","startPage":1.0,"endPage":2.0}""".parseJson val expectedCreatedDocumentIssue = documentIssue.copy(id = LongId(0), lastUpdate = LocalDateTime.MIN, isDraft = true) - val parsedCreateDocumentIssue = jsValueToDocumentIssue(createDocumentIssueJson, LongId(1), StringId("userId-001")) + val parsedCreateDocumentIssue = jsValueToDocumentIssue(createDocumentIssueJson, LongId(1), xyz.driver.core.Id("userId-001")) parsedCreateDocumentIssue should be(expectedCreatedDocumentIssue) val updateDocumentIssueJson = diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/MedicalRecordHistoryFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/MedicalRecordHistoryFormatSuite.scala index ca4058e..88240cd 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/MedicalRecordHistoryFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/MedicalRecordHistoryFormatSuite.scala @@ -2,9 +2,9 @@ package xyz.driver.pdsuidomain.formats.json import java.time.LocalDateTime -import spray.json._ import org.scalatest.{FlatSpec, Matchers} -import xyz.driver.pdsuicommon.domain.{LongId, StringId} +import spray.json._ +import xyz.driver.pdsuicommon.domain.LongId import xyz.driver.pdsuidomain.entities.MedicalRecordHistory class MedicalRecordHistoryFormatSuite extends FlatSpec with Matchers { @@ -14,7 +14,7 @@ class MedicalRecordHistoryFormatSuite extends FlatSpec with Matchers { val recordHistory = MedicalRecordHistory( id = LongId(10), recordId = LongId(1), - executor = StringId("userId-001"), + executor = xyz.driver.core.Id("userId-001"), state = MedicalRecordHistory.State.Clean, action = MedicalRecordHistory.Action.Start, created = LocalDateTime.parse("2017-08-10T18:00:00") diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/MedicalRecordIssueFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/MedicalRecordIssueFormatSuite.scala index c7c82a4..b93e2bd 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/MedicalRecordIssueFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/MedicalRecordIssueFormatSuite.scala @@ -2,9 +2,9 @@ package xyz.driver.pdsuidomain.formats.json import java.time.LocalDateTime -import spray.json._ import org.scalatest.{FlatSpec, Matchers} -import xyz.driver.pdsuicommon.domain.{LongId, StringId} +import spray.json._ +import xyz.driver.pdsuicommon.domain.LongId import xyz.driver.pdsuidomain.entities.MedicalRecordIssue class MedicalRecordIssueFormatSuite extends FlatSpec with Matchers { @@ -14,7 +14,7 @@ class MedicalRecordIssueFormatSuite extends FlatSpec with Matchers { val recordIssue = MedicalRecordIssue( id = LongId(10), recordId = LongId(1), - userId = StringId("userId-001"), + userId = xyz.driver.core.Id("userId-001"), lastUpdate = LocalDateTime.parse("2017-08-10T18:00:00"), isDraft = false, text = "message text", @@ -30,7 +30,7 @@ class MedicalRecordIssueFormatSuite extends FlatSpec with Matchers { val createRecordIssueJson = """{"text":"message text","startPage":1.0,"endPage":2.0}""".parseJson val expectedCreatedRecordIssue = recordIssue.copy(id = LongId(0), lastUpdate = LocalDateTime.MIN, isDraft = true) - val parsedCreateRecordIssue = jsValueToRecordIssue(createRecordIssueJson, LongId(1), StringId("userId-001")) + val parsedCreateRecordIssue = jsValueToRecordIssue(createRecordIssueJson, LongId(1), xyz.driver.core.Id("userId-001")) parsedCreateRecordIssue should be(expectedCreatedRecordIssue) val updateRecordIssueJson = diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientHistoryFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientHistoryFormatSuite.scala index e46cf50..74f6f70 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientHistoryFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientHistoryFormatSuite.scala @@ -2,9 +2,9 @@ package xyz.driver.pdsuidomain.formats.json import java.time.LocalDateTime -import spray.json._ import org.scalatest.{FlatSpec, Matchers} -import xyz.driver.pdsuicommon.domain.{LongId, StringId, UuidId} +import spray.json._ +import xyz.driver.pdsuicommon.domain.{LongId, UuidId} import xyz.driver.pdsuidomain.entities.PatientHistory class PatientHistoryFormatSuite extends FlatSpec with Matchers { @@ -14,7 +14,7 @@ class PatientHistoryFormatSuite extends FlatSpec with Matchers { val patientHistory = PatientHistory( id = LongId(10), patientId = UuidId("40892a07-c638-49d2-9795-1edfefbbcc7c"), - executor = StringId("userId-001"), + executor = xyz.driver.core.Id("userId-001"), state = PatientHistory.State.Verify, action = PatientHistory.Action.Start, created = LocalDateTime.parse("2017-08-10T18:00:00") diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientIssueFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientIssueFormatSuite.scala index 0d56918..ee76094 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientIssueFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientIssueFormatSuite.scala @@ -4,7 +4,7 @@ import java.time.LocalDateTime import spray.json._ import org.scalatest.{FlatSpec, Matchers} -import xyz.driver.pdsuicommon.domain.{LongId, StringId, UuidId} +import xyz.driver.pdsuicommon.domain.{LongId, UuidId} import xyz.driver.pdsuidomain.entities.PatientIssue class PatientIssueFormatSuite extends FlatSpec with Matchers { @@ -14,7 +14,7 @@ class PatientIssueFormatSuite extends FlatSpec with Matchers { val patientIssue = PatientIssue( id = LongId(10), patientId = UuidId("40892a07-c638-49d2-9795-1edfefbbcc7c"), - userId = StringId("userId-001"), + userId = xyz.driver.core.Id("userId-001"), lastUpdate = LocalDateTime.parse("2017-08-10T18:00:00"), isDraft = false, text = "message text", @@ -29,7 +29,7 @@ class PatientIssueFormatSuite extends FlatSpec with Matchers { val expectedCreatedPatientIssue = patientIssue.copy(id = LongId(0), lastUpdate = LocalDateTime.MIN, isDraft = true) val parsedCreatePatientIssue = jsValueToPatientIssue(createPatientIssueJson, UuidId("40892a07-c638-49d2-9795-1edfefbbcc7c"), - StringId("userId-001")) + xyz.driver.core.Id("userId-001")) parsedCreatePatientIssue should be(expectedCreatedPatientIssue) val updatePatientIssueJson = diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/TrialHistoryFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/TrialHistoryFormatSuite.scala index aa0b404..c17327b 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/TrialHistoryFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/TrialHistoryFormatSuite.scala @@ -14,7 +14,7 @@ class TrialHistoryFormatSuite extends FlatSpec with Matchers { val trialHistory = TrialHistory( id = LongId(10), trialId = StringId("NCT000001"), - executor = StringId("userId-001"), + executor = xyz.driver.core.Id("userId-001"), state = TrialHistory.State.Summarize, action = TrialHistory.Action.Start, created = LocalDateTime.parse("2017-08-10T18:00:00") diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/TrialIssueFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/TrialIssueFormatSuite.scala index 5c6aa8d..a3b5931 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/TrialIssueFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/TrialIssueFormatSuite.scala @@ -14,7 +14,7 @@ class TrialIssueFormatSuite extends FlatSpec with Matchers { val trialIssue = TrialIssue( id = LongId(10), trialId = StringId("NCT000001"), - userId = StringId("userId-001"), + userId = xyz.driver.core.Id("userId-001"), lastUpdate = LocalDateTime.parse("2017-08-10T18:00:00"), isDraft = false, text = "message text", @@ -30,7 +30,7 @@ class TrialIssueFormatSuite extends FlatSpec with Matchers { val createTrialIssueJson = """{"text":"message text","evidence":"evidence","meta":"{}"}""".parseJson val expectedCreatedTrialIssue = trialIssue.copy(id = LongId(0), lastUpdate = LocalDateTime.MIN, isDraft = true) val parsedCreateTrialIssue = - jsValueToTrialIssue(createTrialIssueJson, StringId("NCT000001"), StringId("userId-001")) + jsValueToTrialIssue(createTrialIssueJson, StringId("NCT000001"), xyz.driver.core.Id("userId-001")) parsedCreateTrialIssue should be(expectedCreatedTrialIssue) val updateTrialIssueJson = |