Home

Awesome

easy-random-vavr-extension

Build Status Coverage Status Maven Central javadoc GitHub Release

Extension for Easy-Random library adding functionality of generating VAVR collection types (Set, List, Map etc.). Supports nested generic types, for example Map<String, Map<String, List<String>>>

Maven

<dependency>
    <groupId>io.github.xshadov</groupId>
    <artifactId>easy-random-vavr-extension</artifactId>
    <version>1.0.0</version>
</dependency>

Usage

VavrRandomizerRegistry vavrRandomizerRegistry = new VavrRandomizerRegistry();

EasyRandomParameters parameters = new EasyRandomParameters()
        .randomizerRegistry(vavrRandomizerRegistry);

EasyRandom easyRandom = new EasyRandom(parameters);

vavrRandomizerRegistry.setEasyRandom(easyRandom); // registry needs a way to random subtypes

Person randomPerson = easyRandom.nextObject(Person.class);

Building

$ git clone https://github.com/xShadov/easy-random-vavr-extension.git
$ cd easy-random-vavr-extension
$ mvn clean install