six2six / fixture-factory

Generator fake objects from a template
Apache License 2.0
445 stars 88 forks source link

#has function support functions #66

Open nykolaslima opened 9 years ago

nykolaslima commented 9 years ago

When we have an Collection of some primitive, we should be able to define has function using other functions to build the values.

e.g.

//private Set<String> names;
add("names", has(2).of(regex("\\w{10}"));

The above code will generate 2 Strings using the regex function and then return a collection with those values.