Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public with sharing class DividingLogic implements Queueable {
- public String recId;
- public DividingLogic(String recId){
- }
- public void execute(QueueableContext segId){
- // calls a static method of another class
- }
- }
- public void testmethod afterInsertTest(){
- // Given
- fflib_ApexMocks mocks = new fflib_ApexMocks();
- Queueable mockQueue = (Queueable)mocks.mock(DividingLogic.class);
- // When
- // I am wondering how would I pass the QueueableContext here
- // How do I call the execute() method of Queueable
- // Then
- // I want to check whether the class was enqueued from the trigger
- // or called at only 1 time from the trigger.
- // ((Queueable)mocks.verify(mockQueue,1).execute(); ??
- }
Add Comment
Please, Sign In to add comment