Last active
March 2, 2020 11:06
-
-
Save sakthivelsfdc/9a1d24881747dd9482154cb007583ea5 to your computer and use it in GitHub Desktop.
contactUpdateFromScheduleClassTest.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
public class contactUpdateFromScheduleClassTest { | |
@isTest static void contactUpdateTest_Schedule() { | |
Contact cont = new Contact(FirstName ='First Name', LastName ='Last Name', Email='sakthi@theblogreaders.com'); | |
insert cont; | |
// Seconds Minutes Hours Day_of_month Month Day_of_week optional_year | |
String CRON_EXP = '0 6 * * * ?'; | |
Test.startTest(); | |
String jobId = System.schedule('Update Contacts', CRON_EXP, new scheduleStoneExRates()); | |
CronTrigger ct = [SELECT Id, CronExpression, TimesTriggered, NextFireTime FROM CronTrigger WHERE id = :jobId]; | |
System.assertEquals(CRON_EXP, ct.CronExpression); | |
System.assertEquals(0, ct.TimesTriggered); | |
Test.stopTest(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment