You need to sign in to do that
Don't have an account?
JN22
Create Dummy Users for Testing
Hello,
I have a test class that creates and Account (below). In this class, I have included actual User IDs, which is not ideal, especially when users are de-activated. How do I create dummy User IDs with specific profiles that I can use in this Class rather than the actual IDs?
I have a test class that creates and Account (below). In this class, I have included actual User IDs, which is not ideal, especially when users are de-activated. How do I create dummy User IDs with specific profiles that I can use in this Class rather than the actual IDs?
public class TestStatusAcctCreate { // create and insert a new Account record that has an arbitrary value for Type and users assigned to the 3 custom fields. public static Account createAcct(Integer i){ Account acct = new Account(); acct.Name = 'Test' + i; acct.Type= 'Employer'; acct.Client_Advisor__c = '00570000001LlBD'; acct.Industry_Manager__c = '00570000001JKVQ'; acct.Market_Director__c = '00570000001r5xs'; return acct; } }
thanks
dan
All Answers
if this helps mark as resolved :)
thanks
dan