Package de.cuioss.test.generator.domain
Class MailSubjectGenerator
java.lang.Object
de.cuioss.test.generator.domain.MailSubjectGenerator
- All Implemented Interfaces:
TypedGenerator<String>
Generates realistic email subject lines for testing purposes, particularly focused
on healthcare-related communications.
Subject line components:
- Prefixes (0-3): "Re:", "Fw:", "Answ:", "Yep:"
- Content words (0-7): Healthcare-related terms like "Patient", "Document", "Hospital", etc.
The generator creates subject lines by combining:
- Random number (0-3) of prefix elements
- Random number (0-7) of content words
- All elements are joined with spaces
Example outputs:
"Re: Fw: Patient Document" "Hospital Doctor Referral" "Answ: Registration Physician"
Example usage:
var generator = new MailSubjectGenerator(); String subject = generator.next(); // Returns a randomly generated subject line
- Author:
- Oliver Wolff
-
Constructor Details
-
MailSubjectGenerator
public MailSubjectGenerator()
-
-
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<String>- Returns:
- A newly created instance. May be null if the generator explicitly supports null value generation.
-