高章伟
2022-02-24 2aa8da8af66aa8ae00f25831aed6bb0364176e7b
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();
    }
}