彭锟
2022-04-01 216f61fcfdd0bc469cec809c31e4d49c1d86158e
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@isTest
private class NFM112ControllerTest {
    public static String status;
    
    public class Payments_elements{
        public NFMUtil.Monitoring Monitoring;
        public Payment_element Agent;
    }
    public class Payment_element{
        public String AgentCode;
        public String AdvancePaymentFlag;
    }
    
    
    static testMethod void testMethod3(){
        Account testAccount = new Account();
        testAccount.RecordTypeId='01210000000Qem1';
        testAccount.Name = 'testAccount';
        //testAccount.Management_Code__c = '20211206';
        testAccount.Approved_Confirm_Date__c = Date.today();
        //testAccount.FirstParagraph__c = true;
        testAccount.MonthlyPayment__c = false;
        insert testAccount;
        BatchIF_Log__c testBatchLog = new BatchIF_Log__c();
        insert testBatchLog;
        NFM112Controller.ManualExecute(testBatchLog.Id);
        testAccount.MonthlyPayment__c = true;
        update testAccount;
    }
 
    
    static testMethod void testMethod4(){
        Account testAccount = new Account();
        testAccount.RecordTypeId='01210000000Qem1';
        testAccount.Name = 'testAccount';
        //testAccount.Management_Code__c = '20211206';
        testAccount.Approved_Confirm_Date__c = Date.today();
        //testAccount.FirstParagraph__c = true;
        testAccount.MonthlyPayment__c = true;
        insert testAccount;
        BatchIF_Log__c testBatchLog = new BatchIF_Log__c();
        insert testBatchLog;
        NFM112Controller.ManualExecute(testBatchLog.Id);
        testAccount.MonthlyPayment__c = false;
        update testAccount;
    }
 
    static testMethod void testMethod5(){
        Account testAccount = new Account();
        testAccount.RecordTypeId='01210000000Qem1';
        testAccount.Name = 'testAccount';
        //testAccount.Management_Code__c = '20211206';
        testAccount.Approved_Confirm_Date__c = Date.today();
        //testAccount.FirstParagraph__c = true;
        testAccount.MonthlyPayment__c = true;
        insert testAccount;
        BatchIF_Log__c testBatchLog = new BatchIF_Log__c();
        insert testBatchLog;
        NFM112Controller.executeNotFuture(null,testAccount.id);
    }
 
}