Closed esfomeado closed 8 months ago
@esfomeado
Is it work in 1.0.9
? I had a same issue in 1.0.9
. Is an option missing from the test?
It is set as null because Fixture Monkey does not know the implementation of abstract class Condition
.
So, it can not create an implementation of Condition
.
There are two solutions.
Add the interfaceImplements option.
interfaceImplements(Condition.class, List.of(ValueCondition.class))
Use setJust.
set("conditions", Values.just(List.of(condition)))
I think you can go one of two ways.
@seongahjo Sorry you are right but I have a new bug on 1.0.10 where in some scenarios that value that is set is different from the one provided. I will try to create a replication.
I was finally able to reproduce the issue. You can check the same reproduction.
What happens is that Fixture Monkey generates objects again if they are of the same time.
@esfomeado
Thank you for reproducing the issue!
It is fixed in 1.0.11
. Please check it out.
Fixed. Thanks
Describe the bug
After updating to 1.0.10 I'm now unable to set the value of lists. Sometimes is set to
null
other time it's set to something random and not to the value provided. This change was introduced on 1.0.10Your environment
Steps to reproduce
https://github.com/esfomeado/fixture-monkey-bug/blob/master/src/test/java/com/example/bug/FixtureMonkeyTest.java#L133
Expected behaviour
I should be able to set the list value like before
Actual behaviour
The value is set to null or something random.