aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/BridgeUploadQueueGen.scala
diff options
context:
space:
mode:
authorMarvin Bertin <marvin.bertin@gmail.com>2017-10-03 13:09:49 -0700
committerMarvin Bertin <marvin.bertin@gmail.com>2017-10-03 13:09:49 -0700
commit98d6f3d136a16310300e23b12e6b730ac7ade6b6 (patch)
tree34ef97bc59f3c34d20a18cd65107655d319097fc /src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/BridgeUploadQueueGen.scala
parent1d0202a3964637ffb93180a1c89617633ab5ab18 (diff)
parent0653b90dddc294fddb0e81059aef00b202113d78 (diff)
downloadrest-query-98d6f3d136a16310300e23b12e6b730ac7ade6b6.tar.gz
rest-query-98d6f3d136a16310300e23b12e6b730ac7ade6b6.tar.bz2
rest-query-98d6f3d136a16310300e23b12e6b730ac7ade6b6.zip
Merge branch 'add-slot-eligibility-arms' into trial-46-disease-entity
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/BridgeUploadQueueGen.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/BridgeUploadQueueGen.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/BridgeUploadQueueGen.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/BridgeUploadQueueGen.scala
new file mode 100644
index 0000000..e7cbd19
--- /dev/null
+++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/BridgeUploadQueueGen.scala
@@ -0,0 +1,22 @@
+package xyz.driver.pdsuidomain.fakes.entities.rep
+
+import xyz.driver.core.generators.{nextBoolean, nextInt, nextOption, nextString}
+import xyz.driver.pdsuicommon.concurrent.BridgeUploadQueue
+import xyz.driver.pdsuidomain.fakes.entities.common.nextLocalDateTime
+
+object BridgeUploadQueueGen {
+ private val maxAttemptsNumber = 100
+
+ def nextBridgeUploadQueueItem(): BridgeUploadQueue.Item = {
+ BridgeUploadQueue.Item(
+ kind = nextString(),
+ tag = nextString(),
+ created = nextLocalDateTime,
+ attempts = nextInt(maxAttemptsNumber, minValue = 0),
+ nextAttempt = nextLocalDateTime,
+ completed = nextBoolean(),
+ dependencyKind = nextOption(nextString()),
+ dependencyTag = nextOption(nextString())
+ )
+ }
+}