You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some of my tests I need repeatable random numbers, e.g. to test serialization of data objects, for which I must compare the resulting string with a reference string, which isn't currently possible.
For this, I would need to configure the seed of the random number generators used in the RegularExpressionGenerator and RandomNumericSequenceGenerator.
I could give it a try, but I'm not sure how to implement this in accordance with the library's design principles.
Suggestion
Maybe one could create a RandomProvider which is injected to the above two generators and provides a Random instance.
However, an instance of this RandomProvider must be delivered through several constructors to the DefaultPrimitiveBuilders constructor.
I think passing this option later at runtime isn't feasible and not reasonable.
Description
For some of my tests I need repeatable random numbers, e.g. to test serialization of data objects, for which I must compare the resulting string with a reference string, which isn't currently possible.
For this, I would need to configure the seed of the random number generators used in the
RegularExpressionGenerator
andRandomNumericSequenceGenerator
.I could give it a try, but I'm not sure how to implement this in accordance with the library's design principles.
Suggestion
Maybe one could create a
RandomProvider
which is injected to the above two generators and provides aRandom
instance.However, an instance of this
RandomProvider
must be delivered through several constructors to theDefaultPrimitiveBuilders
constructor.I think passing this option later at runtime isn't feasible and not reasonable.
The text was updated successfully, but these errors were encountered: