Package de.cuioss.test.generator.domain
Class PersonGenerator
java.lang.Object
de.cuioss.test.generator.domain.PersonGenerator
- All Implemented Interfaces:
TypedGenerator<Person>
Generates realistic
Person objects for testing purposes.
The generator creates persons with:
- English first names (male and female) from
NameGenerators.FIRSTNAMES_ANY_ENGLISH - English family names from
NameGenerators.FAMILY_NAMES_ENGLISH - Organization names from
OrganizationNameGenerator.READABLE - Professional titles from
TitleGenerator.READABLE - Email addresses generated from the person's name using
EmailGenerator
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
-
PersonGenerator
public PersonGenerator()
-
-
Method Details
-
next
Description copied from interface:TypedGeneratorGenerates the next instance based on the generator's configuration. Implementations must ensure thread-safety.- Specified by:
nextin interfaceTypedGenerator<Person>- Returns:
- A newly created instance. May be null if the generator explicitly supports null value generation.
-