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
26
27
28
29
@Istest
public class lexReturnDeliveryControllerTest {
    static testMethod void testMethod01(){
        //耗材备品申请
        Consum_Apply__c ca = new Consum_Apply__c();
        ca.Name = 'XXXX-YYYY_ZZZZ_1';
        ca.Status__c = '批准';
        ca.DataMigration_Flag__c = true;
        insert ca;
 
        Consum_Apply_Equipment_Set__c caes = new Consum_Apply_Equipment_Set__c();
        caes.Consum_Apply__c = ca.Id;
        caes.Consum_Start_Date__c = Date.today().addDays(20);
        caes.DataMigration_Flag__c = true;
        caes.Consum_Start_Date__c = Date.today().addDays(20);
        insert caes;
        
        Consum_Apply_Equipment_Set_Detail__c caesd = new Consum_Apply_Equipment_Set_Detail__c();
        caesd.Consum_Apply__c = ca.Id;
        caesd.Consum_Apply_Equipment_Set__c = caes.Id;
        caesd.Cancel_Select__c  = false;
        caesd.Follower_User__c = UserInfo.getUserId();
        caesd.DataMigration_Flag__c = true;
        caesd.Consum_Start_Date__c = caes.Consum_Start_Date__c;
        insert caesd;
 
        lexReturnDeliveryController.init(ca.Id);
    }
}