Releases: linux-china/easy-random-junit5-extension
Releases · linux-china/easy-random-junit5-extension
0.5.0
0.3.0
- JDK 17 only: for Java 8 & 11, please use version 0.2.0
- Java Records support
record Person(@Positive int id, @Email String email) {
}
@Test
public void testRecord(@Random Person person) {
System.out.println("person.id = " + person.id());
System.out.println("person.email = " + person.email());
}
0.2.0
i18n friendly to Faker's types
import com.github.javafaker.Address
@Test
public void testAddress(@Random(locale = "zh_CN") Address address) {
System.out.println(address.cityName());
}
0.1.2
0.1.1
Introduce ByteBuddy to mock Field
Initial version
The easy random extension provides a test with randomly generated objects, including:
- JDK types: int/double/BigDecimal/boolean/String etc
- Custom types: POJO, except for records support
- Generic collections: List/Set/Stream/Array
- Java Validation annotations: @Email, @pattern etc