高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
force-app/main/default/classes/BeforeUpsertReportHandlerTest.cls
@@ -1,5 +1,9 @@
@isTest
private class BeforeUpsertReportHandlerTest {
    @TestSetup
    static void makeData(){
        TestDataUtility.CreatePIPolicyConfiguration('Rental_Apply__c');
    }
    static testMethod void testMethod1() {
         RecordType rectOpp = [select id from RecordType where IsActive = true and SobjectType = 'Opportunity' and DeveloperName = 'Opportunity' ];
        
@@ -38,6 +42,7 @@
        oPDPlan0.NoOpp_Reason__c = 'HCP对应';
        oPDPlan0.Related_Opportunity1_ID__c =opp1.id;
        oPDPlan0.Account_Laboratory__c =dep.Id;
        oPDPlan0.OPDType__c = '事件';
        insert oPDPlan0;
        
@@ -105,6 +110,7 @@
        oPDPlan0.Status__c = '草案中';
        oPDPlan0.OPDPlan_ImplementDate__c = Date.today().addDays(1);
        oPDPlan0.NoOpp_Reason__c = 'HCP对应';
        oPDPlan0.OPDType__c = '事件';
        insert oPDPlan0;
        // 产品