You need to sign in to do that
Don't have an account?
Tiffany Leszcynski
TH: Control Processes with Queueable Apex : AddPrimaryContactTest - variables do not exist?
I am getting an error in the dev console that my variables (i and n) do not exist. I've compared to other posts and can't seem to find where my error is. Run tests = 0% What am I missing here?
@isTest private class AddPrimaryContactTest { @testSetup static void TestingList() { List<Account> acc = new List<Account>(); for (Integer i=0;i<50;i++); { acc.add(new Account(BillingState = 'CA', name = 'Testing ' + i)); } for (Integer n=0;n<50;n++); { acc.add(new Account(BillingState = 'NY', name = 'Testing ' + n)); } insert acc; Contact con = new Contact(); con.FirstName = 'First Name'; con.LastName = 'Last Name'; insert con; String state = 'CA'; AddPrimaryContact apc = new AddPrimaryContact(con, state); test.startTest(); system.enqueueJob(apc); test.stopTest(); } }