mattaddy / SObjectFabricator

An SObject fabrication API to reduce database interactions and dependencies on triggers in Apex unit tests.
Other
89 stars 14 forks source link

Update public API - added 'set', and made it very flexible #14

Closed bobalicious closed 3 years ago

bobalicious commented 3 years ago

Can now use set to define any of the fields and relationships.

E.g. against Contact:

Can also use 'set' passing a Map<String,Object> to set multiple fields / relationships as above.

Nodes are now indexed by their names ensuring that duplication of fields / relationships / etc do not occur during configuration. Also helps with the generic 'set' method.

Documentation updated to reflect, and added simple example at the start to make it clearer that the API is simple.

Upgraded API to 50 to support some of the changes.