Skip to content

Instantly share code, notes, and snippets.

@jaspreetsidhu
Created September 15, 2019 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaspreetsidhu/00221c5b2df099b7d757423125f83b01 to your computer and use it in GitHub Desktop.
Save jaspreetsidhu/00221c5b2df099b7d757423125f83b01 to your computer and use it in GitHub Desktop.
public class RandomContactFactory {
public static List<Contact> generateRandomContacts(Integer numOfContacts, String lName) {
List<Contact> cList = new List<Contact>();
for(Integer i=0; i<numOfContacts; i++) {
Contact c = new Contact(Firstname = 'Test' + i, Lastname = lName);
conList.add(c);
}
return cList;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment