fixture-monkey icon indicating copy to clipboard operation
fixture-monkey copied to clipboard

Incompatibility between BuilderArbitraryCustomizer and manipulating the instance

Open njimenezotto opened this issue 3 years ago • 1 comments

I have a class with a BuilderArbitraryCustomizer where I set some Arbitraries. In my tests, I want to use giveMeBuilder(MyClass).set(fieldName_managed_by_arbitrary, myValue).sample() to get an instance with my wished values. This is the arbitrary I use:

.use(Arbitraries.strings().numeric().ofMaxLength(3)).in(MyClass.MyClassBuilder::myField);

Expected Instance with my entered value

Current result Instance with random value from the arbitrary

njimenezotto avatar Jun 04 '22 23:06 njimenezotto

@njimenezotto Hello. Could you give us an example for reproducing the problem?

seongahjo avatar Jun 07 '22 01:06 seongahjo

close now. welcome to reopen!

seongahjo avatar Jan 26 '23 11:01 seongahjo