https://kotlinlang.org logo
#kotest
Title
a

André Martins

01/25/2023, 9:34 AM
Is it possible to use custom Arbs for only some fields when using Arb.data/bind? For instance if I have a
data class Student(val id: Int, val name: String)
and i want to
Arb.data<Student>()
but specify that only want alphanumerical strings for name for example?
Copy code
Arb.data<Student>() {
   name = Arb.string(codepoints = Codepoint.alphanumeric())
}
Is this possible somehow?