高章伟
2022-02-24 2aa8da8af66aa8ae00f25831aed6bb0364176e7b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@isTest
private class FixtureRemindSnapshotBatchTest {
    static testMethod void testMethod1() {
        OlympusCalendar__c oc = new OlympusCalendar__c(Date__c=System.today(), Before_1_WorkDay__c=System.today().addDays(-1));
        insert oc;
        List<FixtureRemindSnapshot__c> frsList = [SELECT Id FROM FixtureRemindSnapshot__c];
        System.assertEquals(0, frsList.size()); 
        Test.startTest();
        FixtureRemindSnapshotBatch b = new FixtureRemindSnapshotBatch();
        b.errorList.add('Test');
        Database.executeBatch(b);
        Test.stopTest();
        frsList = [SELECT Id FROM FixtureRemindSnapshot__c];
        // 2021117 ljh WLIG-C4VDUX update start
        // System.assertEquals(3, frsList.size()); 
        System.assertEquals(35, frsList.size()); 
        // 2021117 ljh WLIG-C4VDUX update end
    }
}