Random test data for unit tests
- Java >= 8
<dependency>
<groupId>eu.benschroeder</groupId>
<artifactId>random-test-data</artifactId>
<version>0.7</version>
</dependency>
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();
...
}
}