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
MUSFAR KT 6MUSFAR KT 6 

How will write test class for this Apex

global with sharing class InvocableCrossObjectActions {
  
  @InvocableMethod
  global static void processCrossObjectActions(List<SObject> items) {
    CrossObjectActionService service = (CrossObjectActionService)PlatformExtensionsApplication.service.newInstance(CrossObjectActionService.class);
    service.processCrossObjectActions(new CrossObjectActionContext(items));
  }
}
PriyaPriya (Salesforce Developers) 
Hi Musfar,
 

Check below example that matches your requirement and write the test class accordingly :- 

https://salesforce.stackexchange.com/questions/96131/how-to-write-a-test-class-for-an-invocablemethod

Tips and Tricks : Test class for Invocable method :- 
http://www.shelovestocode.com/2019/07/tips-and-tricks-test-class-for.html

Please mark it as the Best Answer so that it can help others in the future.

Regards,

Priya Ranjan