mockneat
mockneat copied to clipboard
question: How to add unique objects to a list
given the example:
final private MockUnit<Child> childGenerator =
reflect(Child.class)
.field("id", UUID.fromString(uuids().get()))
.useDefaults(true);
final private MockUnit<Parent> parentGenerator =
reflect(Parent.class)
.field("id", UUID.fromString(uuids().get()))
.field("child", childGenerator.list(2))
.useDefaults(true);
This will result in a list of children having the same id (parent.child(0).id = parent.child(1).id) . I have been trying to resolve it to use the supplier but cannot get it to work.
In general, the question would be: How to get a list of unique objects using diffenre object generators; Meaning the value within the objects are not the same in the list of objects.
any one?
project seems dead.....
@DNWEIJ project is not dead. Sorry, I had the notifications turned off for the MockNeat issues. Is this still a problem for you ?