xShadov / easy-random-vavr-extension

Extension for Easy-Random library adding functionality of generating VAVR collection types.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Extension for Easy-Random library adding functionality of generating VAVR collection types.

License:Apache License 2.0


Languages

Language:Java 100.0%