jFairy

jFairy - Java fake data generator

License

License

GroupId

GroupId

io.codearte.jfairy
ArtifactId

ArtifactId

jfairy
Last Version

Last Version

0.5.9
Release Date

Release Date

Type

Type

jar
Description

Description

jFairy
jFairy - Java fake data generator
Source Code Management

Source Code Management

https://github.com/Codearte/jfairy

Download jfairy

How to add to project

<!-- https://jarcasting.com/artifacts/io.codearte.jfairy/jfairy/ -->
<dependency>
    <groupId>io.codearte.jfairy</groupId>
    <artifactId>jfairy</artifactId>
    <version>0.5.9</version>
</dependency>
// https://jarcasting.com/artifacts/io.codearte.jfairy/jfairy/
implementation 'io.codearte.jfairy:jfairy:0.5.9'
// https://jarcasting.com/artifacts/io.codearte.jfairy/jfairy/
implementation ("io.codearte.jfairy:jfairy:0.5.9")
'io.codearte.jfairy:jfairy:jar:0.5.9'
<dependency org="io.codearte.jfairy" name="jfairy" rev="0.5.9">
  <artifact name="jfairy" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.codearte.jfairy', module='jfairy', version='0.5.9')
)
libraryDependencies += "io.codearte.jfairy" % "jfairy" % "0.5.9"
[io.codearte.jfairy/jfairy "0.5.9"]

Dependencies

compile (10)

Group / Artifact Type Version
org.apache.commons : commons-math3 jar 3.6.1
org.yaml : snakeyaml jar 1.18
com.google.guava : guava jar 20.0
com.google.inject.extensions : guice-assistedinject jar 4.1.0
org.slf4j : slf4j-api jar 1.7.25
joda-time : joda-time jar 2.9.9
org.reflections : reflections jar 0.9.11
org.iban4j : iban4j jar 3.2.1
org.apache.commons : commons-lang3 jar 3.6
com.google.inject : guice jar 4.1.0

test (6)

Group / Artifact Type Version
org.codehaus.groovy : groovy-all jar 2.4.12
org.spockframework : spock-core jar 1.1-groovy-2.4
commons-validator : commons-validator jar 1.6
org.objenesis : objenesis jar 2.6
ch.qos.logback : logback-classic jar 1.2.3
cglib : cglib-nodep jar 3.2.5

Project Modules

There are no modules declared in this project.

jFairy by Codearte

Build Status Maven Central Javadoc 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.

Usage

Creating simple objects:

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

System.out.println(person.fullName());            
// Chloe Barker
System.out.println(person.email());               
// [email protected]
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()); 
// [email protected]

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 gradle command:

./gradlew build

Installation

Installation into maven local repository

./gradlew publishToMavenLocal
io.codearte.jfairy

Versions

Version
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.3
0.5.2
0.5.1
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0
0.3.1