Java fake data generator
Latest commit 8c401e6 Sep 3, 2018
Permalink
Failed to load latest commit information.
.mvn/wrapper switch to maven Mar 12, 2018
src person nationality Mar 18, 2018
.editorconfig Add editorconf file Oct 31, 2016
.gitignore switch to maven Mar 12, 2018
.travis.yml add coveralls Mar 12, 2018
LICENSE Initial commit Oct 7, 2013
README.md Update README.md Sep 3, 2018
mvnw switch to maven Mar 12, 2018
mvnw.cmd switch to maven Mar 12, 2018
pom.xml Remove compile/runtime dependency to groovy-all May 7, 2018

README.md

jFairy by Devskiller

Build Status Maven Central Javadocs Coverage Status Stack Overflow Join the chat at https://gitter.im/Codearte/jfairy

Java fake data generator. Based on Wikipedia:

Fairyland, in folklore, is the fabulous land or abode of fairies or fays.

Try jFairy online!

https://devskiller.com/datafairy/

Usage

Creating simple objects:

Fairy fairy = Fairy.create();
Person person = fairy.person();

System.out.println(person.fullName());            
// Chloe Barker
System.out.println(person.email());               
// barker@yahoo.com
System.out.println(person.telephoneNumber());     
// 690-950-802

Person adultMale = fairy.person(male(), minAge(21));
System.out.println(adultMale.isMale());           
// true
System.out.println(adultMale.dateOfBirth());      
// at least 21 years earlier

Creating related objects:

Fairy fairy = Fairy.create();
Company company = fairy.company();
System.out.println(company.name());          
// Robuten Associates
System.out.println(company.url());           
// http://www.robuteniaassociates.com

Person salesman = fairy.person(withCompany(company));
System.out.println(salesman.fullName());     
// Juan Camacho
System.out.println(salesman.companyEmail()); 
// juan.camacho@robuteniaassociates.com

Locale support:

Fairy enFairy = Fairy.create();                               
// Locale.ENGLISH is default
Fairy plFairy = Fairy.create(Locale.forLanguageTag("pl"));    
// Polish version

Other samples

Look into code samples

Building

This project can be built using maven command:

./mvnw install