liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@isTest
public class DeleteFileSchedulableTest {
    @TestSetup
    static void makeData(){
        List<String> strList= new List<String>();
        strList.add('Document');
        TestDataUtility.CreatePIPolicyConfigurations(strList);
        Transaction_Log__c traLog = new Transaction_Log__c();
        traLog.AWS_Data_Id__c = '123';
        traLog.Module__c = '签收单附件删除';
        traLog.Status__c = 'In Process';
        insert traLog;
    }
 
    static testMethod void testMethod1() {
        String CRON_EXP = '0 0 0 3 9 ? 2099';
        System.Test.startTest();
        Map<String,Object> accMap = new Map<String,Object>();
        accMap.put('object','vjdoneqvds');
        String mapJson = JSON.serialize(accMap);
        Test.setMock(HttpCalloutMock.class, new TestDataUtility.BaseHttpMock(mapJson,'0','200'));
        system.schedule('DeleteFileSchedulableTest', CRON_EXP, new DeleteFileSchedulable());
        System.Test.StopTest();
    }
}