From 1fb0d62c569a30bc0b4c30f48212c5582233184b Mon Sep 17 00:00:00 2001 From: GWY <guweiyi@prec-tech.com> Date: 星期三, 11 五月 2022 19:01:36 +0800 Subject: [PATCH] 更改逻辑,无影响。 --- force-app/main/default/classes/OrderPdf2ControllerTest.cls | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-) diff --git a/force-app/main/default/classes/OrderPdf2ControllerTest.cls b/force-app/main/default/classes/OrderPdf2ControllerTest.cls index 1cca8b0..ed740dc 100644 --- a/force-app/main/default/classes/OrderPdf2ControllerTest.cls +++ b/force-app/main/default/classes/OrderPdf2ControllerTest.cls @@ -1,6 +1,12 @@ @isTest private class OrderPdf2ControllerTest { + @TestSetup + static void setup(){ + TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Contact','Opportunity','Order'}); + } + + @isTest static void test_init1() { OrderPdf2Controller.asd(); List<RecordType> rectDealer = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Dealer']; @@ -105,7 +111,8 @@ EffectiveDate = Date.today(), Status = 'Draft', Pricebook2Id = pricebook.Id, - EndUser__c = contact.Id + EndUser__c = contact.Id, + EndUserD__c = contact.Id //ProductListApproveStatus__c = 'Reject' ); insert order; @@ -286,7 +293,8 @@ EffectiveDate = Date.today(), Status = 'Draft', Pricebook2Id = pricebook.Id, - EndUser__c = contact.Id + EndUser__c = contact.Id, + EndUserD__c = contact.Id ); insert order; @@ -421,7 +429,8 @@ EffectiveDate = Date.today(), Status = 'Draft', Pricebook2Id = pricebook.Id, - EndUser__c = contact.Id + EndUser__c = contact.Id, + EndUserD__c = contact.Id //ProductListApproveStatus__c = 'Reject' ); insert order; @@ -547,7 +556,8 @@ EffectiveDate = Date.today(), Status = 'Draft', Pricebook2Id = pricebook.Id, - EndUser__c = contact.Id + EndUser__c = contact.Id, + EndUserD__c = contact.Id ); insert order; @@ -683,7 +693,8 @@ EffectiveDate = Date.today(), Status = 'Draft', Pricebook2Id = pricebook.Id, - EndUser__c = contact.Id + EndUser__c = contact.Id, + EndUserD__c = contact.Id //ProductListApproveStatus__c = 'Reject' ); insert order; @@ -810,7 +821,8 @@ EffectiveDate = Date.today(), Status = 'Draft', Pricebook2Id = pricebook.Id, - EndUser__c = contact.Id + EndUser__c = contact.Id, + EndUserD__c = contact.Id ); insert order; -- Gitblit v1.9.1