Class PersonGenerator

java.lang.Object
de.cuioss.test.generator.domain.PersonGenerator
All Implemented Interfaces:
TypedGenerator<Person>

public class PersonGenerator extends Object implements TypedGenerator<Person>
Generates realistic Person objects for testing purposes. The generator creates persons with:

Example usage:

 var generator = new PersonGenerator();
 Person person = generator.next();
 // person will have realistic first name, last name, title, organization and email
 
Author:
Oliver Wolff
  • Constructor Details

  • Method Details

    • next

      public Person next()
      Description copied from interface: TypedGenerator
      Generates the next instance based on the generator's configuration. Implementations must ensure thread-safety.
      Specified by:
      next in interface TypedGenerator<Person>
      Returns:
      A newly created instance. May be null if the generator explicitly supports null value generation.