Open
Description
hi,
I just noticed that protobuf field predicates are not working when specifying custom random values providers.
For example, the following test fails
void shouldUseCustomProviderRegistryToFillFields(){
EasyRandomParameters parameters = new EasyRandomParameters().randomize(ProtobufPredicates.named("int32Field"), () -> 42);
EasyRandom easyRandom = new EasyRandom(parameters);
Proto3Message protoInstance = easyRandom.nextObject(Proto3Message.class);
assertThat(protoInstance.getInt32Field()).isEqualTo(42);
}
I've found a solution and pushed it to my fork, will create PR now because it involves exposing EasyRandomParameters's custom randomizer provider so that we are able to access it. Any suggestion is welcome.
Metadata
Metadata
Assignees
Labels
No labels