Christophe Willemsen e7a96c65e7 Number generator (#70)
* Number generators

* removed console output in test

* fix java6 usage for generating doubles

* removed unused import

* tests for numberBetween

* use hamcrest, renamed randomDigitNotNull to randomDigitNotZero and added some docblocks
2016-04-17 11:29:14 +10:00
2016-04-17 11:29:14 +10:00
2014-04-23 17:21:06 +10:00
2014-04-23 12:33:11 +10:00
2016-04-14 07:47:12 +10:00

Java Faker

Maven Status

Build Status

Coverage Status

This library is a port of Ruby's stympy/faker gem (as well as Perl's Data::Faker library) that generates fake data. It's useful when you're developing a new project and need some pretty data for showcase.

Usage

In pom.xml, add following between <dependencies> ... </dependencies>

<dependency>
    <groupId>com.github.javafaker</groupId>
    <artifactId>javafaker</artifactId>
    <version>0.8</version>
</dependency>

For gradle users, add the following to your build.gradle file.

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'com.github.javafaker', name: 'javafaker', version: '0.8'
}

In your Java code

Faker faker = new Faker();

String name = faker.name().fullName(); // Miss Samanta Schmidt
String firstName = faker.name().firstName(); // Emory
String lastName = faker.name().lastName(); // Barton

String streetAddress = faker.address().streetAddress(); // 60018 Sawayn Brooks Suite 449

Javadoc

http://dius.github.io/java-faker/apidocs/index.html

How to build

  1. Make sure Apache Maven 3 is installed. ($ mvn --version)
  2. $ mvn package

TODO

  1. Add regexify method so we can just use the en.yml from faker as is
  2. Port more classes over as there are more entries in the yml file that we don't have classes for

LICENSE

Copyright (c) 2014 DiUS Computing Pty Ltd. See the LICENSE file for license rights and limitations.

S
Description
Brings the popular ruby faker gem to Java
Readme 14 MiB
Languages
Java 100%