isRandom with range of values
Opened this issue · 1 comments
nykolaslima commented
Is it possible to call isRandom
but specifying the possible values?
Something like:
FactoryPal.register[Person]() { person =>
person.age.isRandom(18, 19, 20)
}
SKoschnicke commented
Not directly, I think. But you can pass your own generator function which is called without parameters and has to provide the value. See https://github.com/mgonto/factory_pal/blob/master/framework-src/src/main/scala/ar/com/gonto/factorypal/fields/FieldBuilder.scala#L45