aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala
diff options
context:
space:
mode:
authorvlad <vlad@driver.xyz>2017-10-01 12:50:54 -0700
committervlad <vlad@driver.xyz>2017-10-01 12:50:54 -0700
commitb5e0d5f91b52013bc11ef3ea586a54bb001577bc (patch)
tree58d6ca321e1f9176d02e24fbde6321bddadb21ee /src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala
parent46b354b6a49c0843fefc5794f2351f52b98102bd (diff)
downloadrest-query-b5e0d5f91b52013bc11ef3ea586a54bb001577bc.tar.gz
rest-query-b5e0d5f91b52013bc11ef3ea586a54bb001577bc.tar.bz2
rest-query-b5e0d5f91b52013bc11ef3ea586a54bb001577bc.zip
Fixing IN in filters, Model from EVLS added to common, Reusing domain model labelsv0.5.1
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala
new file mode 100644
index 0000000..7f3c410
--- /dev/null
+++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala
@@ -0,0 +1,35 @@
+package xyz.driver.pdsuidomain.fakes.entities
+
+import xyz.driver.entities.labels.Label
+import xyz.driver.pdsuidomain.entities.{Arm, Criterion, Trial}
+import xyz.driver.pdsuidomain.entities.export.trial._
+
+object export {
+ import xyz.driver.core.generators._
+ import common._
+
+ def nextExportTrialArm(): ExportTrialArm =
+ ExportTrialArm(armId = nextLongId[Arm], armName = nextString(100))
+
+ def nextExportTrialLabelCriterion(): ExportTrialLabelCriterion =
+ ExportTrialLabelCriterion(
+ criterionId = nextLongId[Criterion],
+ value = nextOption[Boolean](nextBoolean()),
+ labelId = nextLongId[Label],
+ armIds = setOf(nextLongId[Arm]),
+ criteria = nextString(100),
+ isCompound = nextBoolean(),
+ isDefining = nextBoolean()
+ )
+
+ def nextExportTrialWithLabels(): ExportTrialWithLabels =
+ ExportTrialWithLabels(
+ nctId = nextStringId[Trial],
+ trialId = nextUuidId[Trial],
+ condition = nextString(100),
+ lastReviewed = nextLocalDateTime,
+ labelVersion = nextInt(100).toLong,
+ arms = listOf(nextExportTrialArm()),
+ criteria = listOf(nextExportTrialLabelCriterion())
+ )
+}