-
Notifications
You must be signed in to change notification settings - Fork 4
Tutorial 9: SimpleRandomGenerator
Kumar Rohit edited this page Oct 3, 2015
·
1 revision
When writing tests we spend a lot of time creating test models, even when writing unit tests. So to reduce the efforts we have SimpleRandomGenerator.
Similar to random-JPA, we have a factory to which we can configure generator i.e. RandomClassGenerator & RandomFieldGenerator
final SimpleRandomGenerator simpleRandomGenerator = SimpleRandomGeneratorFactory
.newInstance()
.with(RandomClassGenerators ... )
.with(RandomFieldGenerators ... )
.create();
final Person randomPerson = simpleRandomGenerator.getRandom(Person.class);