Currently, you can construct a sfab_FabricatedSObject these ways:
new sfab_FabricatedSObject(Type xxx.class);
new sfab_FabricatedSObject(Type xxx.class, map<SObjectField,Object> valuesByFieldToken);
It would be useful in constructing fixtures of SObjects to also support:
new sfab_FabricatedSObject(
Type xxx.class,
map<SObjectField,Object> valuesByFieldToken,
map<String,sFab_FabricatedSObject> fabricatedParentsByRelationshipName);
A common use case is to have a fixture of "default" SObject where such default includes default parents. For example, a default Opportunity with a default Account.
BTW; we've installed this package in our org and love it! Replaces an earlier home grown library that used similar JSON technique but wasn't as expressive.
Currently, you can construct a sfab_FabricatedSObject these ways:
new sfab_FabricatedSObject(Type xxx.class);
new sfab_FabricatedSObject(Type xxx.class, map<SObjectField,Object> valuesByFieldToken);
It would be useful in constructing fixtures of SObjects to also support:
A common use case is to have a fixture of "default" SObject where such default includes default parents. For example, a default Opportunity with a default Account.
BTW; we've installed this package in our org and love it! Replaces an earlier home grown library that used similar JSON technique but wasn't as expressive.