Awesome
easy-random-protobuf
Extension for Easy Random library adding support for Protocol buffers.
Maven
<dependency>
<groupId>io.github.murdos</groupId>
<artifactId>easy-random-protobuf</artifactId>
<version>0.4.0</version>
</dependency>
Usage
This library declares a SPI provider, so Easy Random will detect it automatically.
If you want to explicitly use it:
EasyRandomParameters parameters = new EasyRandomParameters()
.randomizerRegistry(new ProtobufRandomizerRegistry());
EasyRandom easyRandom = new EasyRandom(parameters);
Person randomPerson = easyRandom.nextObject(Person.class); // With Person being a generated class from a .proto file
Building
$ git clone https://github.com/murdos/easy-random-protobuf.git
$ cd easy-random-protobuf
$ mvn clean install