https://github.com/ben-schroeder/random-test-data
Random test data for unit tests
https://github.com/ben-schroeder/random-test-data
java unit-testing
Last synced: 6 months ago
JSON representation
Random test data for unit tests
- Host: GitHub
- URL: https://github.com/ben-schroeder/random-test-data
- Owner: ben-schroeder
- License: mit
- Created: 2020-02-11T20:29:08.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-04T11:12:47.000Z (over 1 year ago)
- Last Synced: 2024-12-04T11:18:46.659Z (over 1 year ago)
- Topics: java, unit-testing
- Homepage:
- Size: 77.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# random-test-data
[](https://travis-ci.com/ben-schroeder/random-test-data)
[](https://raw.githubusercontent.com/ben-schroeder/random-test-data/master/LICENSE)
[](https://maven-badges.herokuapp.com/maven-central/eu.benschroeder/random-test-data)
Random test data for unit tests
## Requirements
* Java >= 8
## Artifacts
```
eu.benschroeder
random-test-data
0.7
```
## Usage
```
import eu.benschroeder.testdata.WithRandomTestData;
public class MyUnitTest implements WithRandomTestData {
@Test
void testMyMethod() {
final long anyId = randomLong();
final String anyName = randomAlphabetic();
final LocalDateTime anyLocalDateTime = randomPastLocalDateTime();
...
}
}
```