张宇恒
2022-03-11 37963a4f1dafc7e8accd8b28204ed1e6b7e29e9d
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
34
35
36
37
38
39
@isTest
private class NFM701ControllerHandlerTest {
    
    
    static testMethod void testMethod1() {
        ControllerUtil.EscapeNFM001Trigger = true;
        // ControllerUtil.EscapeMaintenanceContractAfterUpdateTrigger = true;
        // StaticParameter.EscapeNFM001Trigger = true;
        // StaticParameter.EscapeNFM001AgencyContractTrigger = true;
        // StaticParameter.EscapeNFM001AgencyContractTrigger2 = true;
        // StaticParameter.EscapeMaintenanceContractAfterUpdateTrigger = true;
        
 
 
         List < RecordType > rectCo00 = [select Id from RecordType where IsActive = true and SobjectType = 'Account'
            and Name = '病院'
        ];
        Test.startTest();
        Account hospital = new Account();
        hospital.RecordTypeId = rectCo00[0].Id;
        // hospital.Is_Active__c = '有効';
        hospital.Name = 'hospital';
        // hospital.RecordType.DeveloperName = 'HP';
        hospital.Is_Active__c = '無効';
        hospital.Ban_On_Use_Reason__c = '312343';
        hospital.AwaitToSendAWS__c = true;
        insert hospital;
        List < String > accountIdList = new List < String >();
        accountIdList.add(hospital.Id);
        BatchIF_Log__c iflog = new BatchIF_Log__c();
        iflog.Log__c = 'test start \n';
        insert iflog;
        hospital.Is_Active__c = '有効';
        upsert hospital;
        // NFM701Controller.callout(iflog.Id, accountIdList);
        // Database.executeBatch(new Sfdc2PoAccountBatch(accountIdList),100);
        Test.stopTest();
    }
}