Datasets
Collection of datasets, intended to be used inside of tests. DEPRECATED: Use Java 8 Random.doubles—, etc
Usage
Create random integers or longs:
// Create 100 random integers between Integer.MIN_VALUE and Integer.MAX_VALUE
int[] numbers = Datasets.ints()
.build();
// Create 10 random longs between -250 and 250
long[] numbers = Datasets.longs()
.lowestInclusive(-250)
.highestInclusive(250)
.numbersToCreate(10)
.build();
// Create 100 random floats between 0 and Integer.MAX_VALUE using '42' as seed
float[] numbers = Datasets.floats()
.lowestInclusive(0)
.seed(42)
.build();
// Create 100 random doubles between Integer.MIN_VALUE and 0 using '42' as seed
double[] numbers = Datasets.doubles()
.highestInclusive(0)
.seed(42)
.build();
Integration
This project is uploaded into Maven Central. Take a look for the latest version.
<dependency>
<groupId>com.github.sebhoss</groupId>
<artifactId>datasets</artifactId>
<version>${version.datasets}</version>
<scope>test</scope>
</dependency>
Development
License
This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See LICENSE or http://www.wtfpl.net/ for more details.
Setup
This projects uses Java, Maven and Git as the main development tools. To build the project yourself just download & install at least Maven 3.0 and call mvn install inside the project folder. Maven should then proceed to clean, build, package and install this project.
Versioning
This project follows the semantic versioning guidelines.