高章伟
2022-03-18 a0bc3e3af59aed35334bdc38256a7a1dfe8aecf3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
@isTest
private class AssetMaintainAutoScheduleTest {
    @isTest static void test_method_one() {
        OlympusCalendar__c oc = new OlympusCalendar__c(
            Date__c = System.today(),
            Before_5_WorkDay__c = System.today().addDays(-5),
            Before_4_WorkDay__c = System.today().addDays(-4)
        );
        insert oc;
        String CRON_EXP = '0 0 0 3 9 ? 2022';
        System.Test.startTest();
        String jobId = system.schedule('AssetMaintainAutoScheduleTest', CRON_EXP, new AssetMaintainAutoSchedule());
        System.Test.StopTest();
    }
}