aparra/fixture-factory — Issue #3: Casting by type target property
Author: aparra
Created: 2012-03-03 15:10:05+00:00
State: open

Example:

public class Any {
private Long id;
}

Fixture.of(Any.class).addTemplate("valid", new Rule(){{
add("id", regex("\\d{3,5}"));
});

The regex function yields a value not compatible with id.