I saw a few people asking for this feature, in Caelum's blog and in UOL.
With this PR we can use f-f like this:
Fixture.from(User.class).gimme(2, "male", "female");
Fixture.of(User.class).addTemplate("valid", new Rule() {{
add("phones", has(2).of(Phone.class, "home", "mobile"));
}});
We still can pass only one template.
To make it possible, I need to change properties that use targetAttribute.
It was: add("phones", has(2).of(Phone.class, "valid", "targetAttribute"));
Now it is: add("phones", has(2).of(Phone.class, "valid").targetAttribute("targetAttribute"));
I saw a few people asking for this feature, in Caelum's blog and in UOL.
With this PR we can use f-f like this:
Fixture.from(User.class).gimme(2, "male", "female");
We still can pass only one template.
To make it possible, I need to change properties that use
targetAttribute
. It was:add("phones", has(2).of(Phone.class, "valid", "targetAttribute"));
Now it is:add("phones", has(2).of(Phone.class, "valid").targetAttribute("targetAttribute"));