高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
@isTest
private class AssetMaintainDetailHandlerTest {
    static testMethod void testMethod1() {
        AssetMaintainHeader__c header = new AssetMaintainHeader__c();
        header.MaintainType__c = '断念找回(断念取消)';
        header.Date__c = System.today();
        insert header;
 
        AssetMaintainDetail__c amd = new AssetMaintainDetail__c();
        amd.OrderNumber__c = 1;
        amd.AssetMaintainHeader__c = header.Id;
        amd.MaintainType__c = '断念找回(断念取消)';
 
        try {
            insert amd;
        } catch (Exception e) {}
        
 
        //amd = [SELECT Name FROM AssetMaintainDetail__c LIMIT 1];
        //System.assertEquals('WHD-DJ' + System.now().format('-YYYYMM-') + '0001', amd.Name);
 
    }
}