0

I am new in sfdc and i dont know how to call this method in test class. please help.

  @future(callout=true)
        public static void deleteRecord(Set<Id> lstId,Map<Id, 
            String> deleteRgId, String objType, String extField,String endPoint)
1

try this,

Test.startTest();

yourclass.futuremethod(set,Map, 'Test1','Test2 ','Test3 ' ); - pass set , map and 3 dummy strings.

Test.stopTest();
0

Just adding some more explanation of why the pattern Himanshu suggests works copied from the Test.stopTest documentation:

All asynchronous calls made after the startTest method are collected by the system. When stopTest is executed, all asynchronous processes are run synchronously.

  • i thought its passes the arguments set , map and strings so i suggest this demo data.is something wrong? – Himanshu jasuja Mar 22 '17 at 13:29
  • @Himanshujasuja Yes those values can be passed. My answer is just filling in the detail that the execution all happens in Test.stopTest. – Keith C Mar 22 '17 at 14:20