Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 1008 Bytes

File metadata and controls

13 lines (11 loc) · 1008 Bytes

Test SObject Builder for Salesforce Apex

Deploy to Salesforce

Overview

This is an freestanding version of the Nebula framework's test SObject builder, used to generate test records for unit tests - it has been updated to remove any dependencies on the rest of the Nebula framework.

Implementation

TestSObjectBuilder.cls is the primary focus of this project - to leverage it, create a class that extends TestSObjectBuilder.Base. 2 sample classes have been included in the repo

  • TestAccountBuilder.cls - demonstrates the most basic implementation of TestSObjectBuilder.Base
  • TestContactBuilder.cls - demonstrates how to make additional fields, like contact.AccountId, required to be populated by adding a new constructor with an account ID parameter