Srki Rakic
07/07/2021, 2:43 PMdata class CreateTokensRequest(
val resourceId: UUID,
val requestId: String,
val schedule : Map<LocalDate, Long>,
)
I can’t quite figure out how to do map of LocalDate
to Long
I was trying something like this.
val createRequestArb: Arb<CreateTokensRequest> = Arb.bind(
Arb.string(),
mapOf(Arb.localDate(), Arb.long(0, 1000))
) { requestId, schedule -> CreateTokensRequest(UUID.randomUUID(), requestId, schedule) }
Map<LocalDate, Long>
a List<Transaction>
and create Arb<Transaction>
simon.vergauwen
07/07/2021, 4:37 PMArb.map
that takes 2 Arb
.
In your original snippet you use mapOf
but I think you want Arb.map(Arb.localDate(), Arb.long(0, 1000))
.Srki Rakic
07/07/2021, 4:38 PM