-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Currently, fields can be customized even when deeply nested:
fixture().build(MyClass.class).with("property.childProperty", 42).create();
fixture().build(MyClass.class).without("property.childProperty").create();This does not work, if property is a collection, because collections do not have a property childProperty.
Given the following structure:
public record Parent(List<Child> children) {
public record Child(BigDecimal value) {}
}I would like to customize value for all children by using:
fixture().build(Parent.class).with("children.value", BigDecimal.valueOf(42L)).create();
fixture().build(Parent.class).without("children.value").create();