function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sweta kumari 55sweta kumari 55 

How to write test case for this code?

How to write test case for this code?

global void execute(SchedulableContext sc){
        Database.executeBatch(new AESL_BatchForSyncMockToErp( setOfErIds ));
        System.abortJob(sc.getTriggerId());
    }
AnkaiahAnkaiah (Salesforce Developers) 
Hi Swetha,

Refer the below link have solution for similar kind of issue.
https://salesforce.stackexchange.com/questions/173085/system-abortjob-from-apex-test-method

Thanks!!