Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global class or_guestsSchedulable implements Schedulable{
- global void execute(SchedulableContext sc)
- {
- or_service.getGuests();
- }
- }
- private class or_guestsSchedulableTest {
- private static testMethod void or_guestsSchedulable() {
- Test.startTest();
- Datetime dt = Datetime.now().addMinutes(1);
- String CRON_EXP = '0 '+ dt.minute() + ' * ' + dt.day() + ' ' + dt.month() + ' ? ' + dt.year();
- or_guestsSchedulableTest.execute('Sample_Heading', CRON_EXP, new or_guestsSchedulable () );
- Test.stopTest();
- }
- }
- private class or_guestsSchedulableTest {
- private static testMethod void or_guestsSchedulableMethodTest() {
- Test.startTest();
- String jobId = System.schedule('Sample_Heading', CRON_EXP, new or_guestsSchedulable());
- Test.stopTest();
- }
- }
- // Schedule the test job
- String jobId = System.schedule('Sample_Heading',
- CRON_EXP,
- new or_guestsSchedulable());
- or_guestsSchedulableTest.execute('Sample_Heading', CRON_EXP, new or_guestsSchedulable () );
Add Comment
Please, Sign In to add comment