| | |
| | | |
| | | static testMethod void test_method_one() { |
| | | // This test runs a scheduled job at midnight Sept. 3rd. 2022 |
| | | String CRON_EXP = '0 0 0 3 9 ? 2022'; |
| | | String CRON_EXP = '0 0 0 3 9 ? 2040'; |
| | | |
| | | System.Test.startTest(); |
| | | // Schedule the test job |
| | |
| | | // Verify the job has not run |
| | | System.assertEquals(0, ct.TimesTriggered); |
| | | // Verify the next time the job will run |
| | | System.assertEquals('2022-09-03 00:00:00', String.valueOf(ct.NextFireTime)); |
| | | System.assertEquals('2040-09-03 00:00:00', String.valueOf(ct.NextFireTime)); |
| | | System.Test.StopTest(); |
| | | } |
| | | |