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
Soundar Rajan PonpandiSoundar Rajan Ponpandi 

How to cover a test class for this class ?

HI,

Can anyone please cover a test class for following code ?
 
public without sharing class GD_RemoveProcessRecords {

    public static void removeProcess(List<Approval.ProcessWorkitemRequest> requests){
         Approval.process(requests, true);
    }
}


Regards,
Soundar.
 
ANUTEJANUTEJ (Salesforce Developers) 
Hi Soundar,

I found the developer documentation can you please have a look at it:

>>https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_qs_test.htm

I believe you need to have a simple test class with a method in which you would be calling the method you would like to test.

If this helps can you please choose this as the best answer so that it can be used by others in the future.

Regards,
Anutej.