42 lines
2.0 KiB
OpenEdge ABL
42 lines
2.0 KiB
OpenEdge ABL
@isTest
|
|
public with sharing class DeleteScheduledJobs_test {
|
|
@isTest
|
|
public static void deleteJob(){/*
|
|
|
|
//*********************************************************************
|
|
HIC_ShopifySync__Configuration__c confgObj = new HIC_ShopifySync__Configuration__c();
|
|
confgObj.HIC_ShopifySync__Number_of_pages_for_Account__c =2;
|
|
confgObj.HIC_ShopifySync__Default_Account__c=true;
|
|
confgObj.HIC_ShopifySync__Shopify_URL__c='https://google.com';
|
|
confgObj.HIC_ShopifySync__API_Key__c='apiKey';
|
|
confgObj.HIC_ShopifySync__Private_Key_Password__c='1245896';
|
|
confgObj.HIC_ShopifySync__Opportunity__c=true;
|
|
confgObj.HIC_ShopifySync__Order__c=true;
|
|
confgObj.HIC_ShopifySync__Opportunity_Line_Item__c=true;
|
|
confgObj.HIC_ShopifySync__Order_Line_Item__c=true;
|
|
confgObj.HIC_ShopifySync__Order_Fulfillment__c=true;
|
|
confgObj.HIC_ShopifySync__Person_Account__c=true;
|
|
confgObj.HIC_ShopifySync__Account_Contact__c=true;
|
|
confgObj.name='Default';
|
|
insert confgObj;
|
|
|
|
//*********************************************************************
|
|
test.starttest();
|
|
FetchAccounts_Schedule reminder = new FetchAccounts_Schedule();
|
|
reminder.execute(null);
|
|
// Seconds Minutes Hours Day_of_month Month Day_of_week optional_year
|
|
String sch = '20 30 8 10 2 ?';
|
|
String jobID = System.schedule('Fetch Account', sch, reminder);
|
|
system.debug('***jobID'+jobID);
|
|
CronTrigger ct = [SELECT Id, CronExpression, TimesTriggered, NextFireTime FROM CronTrigger WHERE id = :jobId limit 1];
|
|
DeleteScheduledJobs.deleteJob('Fetch Account');
|
|
DeleteScheduledJobs.deleteJob('');
|
|
DeleteScheduledJobs.deleteJob('Fetch Account');
|
|
test.stopTest();
|
|
system.debug('***ct'+ct);
|
|
System.assertEquals(sch, ct.CronExpression);
|
|
System.assertEquals(0, ct.TimesTriggered);
|
|
*/
|
|
System.assert(true,true);
|
|
}
|
|
} |