You need to sign in to do that
Don't have an account?
MUSFAR 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));
}
}
@InvocableMethod
global static void processCrossObjectActions(List<SObject> items) {
CrossObjectActionService service = (CrossObjectActionService)PlatformExtensionsApplication.service.newInstance(CrossObjectActionService.class);
service.processCrossObjectActions(new CrossObjectActionContext(items));
}
}
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