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
26
27
28
29
30
31
32
33
@isTest
private class NFM613ControllerTest {
    static testMethod void testMethod1() {
        List<String> repairSoIdList = new List<String>();
        RepairSubOrder__c subRepair = new RepairSubOrder__c();
        subRepair.Name = 'test001';
        subRepair.Status__c = '待处理';
        insert subRepair;
        repairSoIdList.add(subRepair.Id);
        BatchIF_Log__c iflog = new BatchIF_Log__c();
        iflog.Type__c = 'NFM613';
        iflog.Log__c = 'callout start\n';
        insert iflog;
        NFM613Controller.callout(iflog.Id, repairSoIdList);
        NFM613Controller.callout(null, repairSoIdList);
    }
    static testMethod void testMethod2() {
        List<String> repairSoIdList = new List<String>();
        RepairSubOrder__c subRepair = new RepairSubOrder__c();
        subRepair.Name = 'test001';
        subRepair.Status__c = '待处理';
        insert subRepair;
        repairSoIdList.add(subRepair.Id);
        BatchIF_Log__c iflog = new BatchIF_Log__c();
        iflog.Type__c = 'NFM613';
        iflog.Log__c = 'callout start\n';
        insert iflog;
        NFM613Controller.callout(iflog.Id, repairSoIdList);
        NFM613Controller.callout(null, repairSoIdList);
        NFM613Controller.execute(iflog, null);
        NFM613Controller.ManualExecute(iflog.Id);
    }
}