six2six / fixture-factory

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

New Sequence Function #10

Closed aparra closed 11 years ago

aparra commented 12 years ago

Create a sequence function that supports only class [sequence(Long.class)].

e.g

Fixture.of(Student.class).addTemplate("valid", new Rule() {{ add("id", sequence(Long.class)); // sequence of long starting at 1L and incremented by 1L }});