| | |
| | | @isTest |
| | | private class OrderDivisionControllerTest { |
| | | // Update PIPL 20220516 By Chen Yanan Start |
| | | @TestSetup |
| | | static void makeData(){ |
| | | TestDataUtility.CreatePIPolicyConfiguration(); |
| | | } |
| | | // Update PIPL 20220516 By Chen Yanan End |
| | | |
| | | @isTest static void test_init() { |
| | | Id pricebookId = Test.getStandardPricebookId(); |
| | | @isTest static void test_init() { |
| | | Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock()); // Update PIPL 20220516 By Chen Yanan |
| | | Id pricebookId = Test.getStandardPricebookId(); |
| | | |
| | | Pricebook2 pricebook = new Pricebook2( |
| | | Name = 'BS', |
| | |
| | | Account user = new Account( |
| | | Name = '*', |
| | | FacilityName__c = 'user', |
| | | OwnerId = UserInfo.getUserId(), |
| | | PostCode__c = '123456', |
| | | RecordTypeId = rectBS[0].Id |
| | | ); |
| | |
| | | AccountId = user.Id, |
| | | StageName = 'Phase3', |
| | | CurrencyIsoCode = 'CNY', |
| | | OwnerId = UserInfo.getUserId(), |
| | | ProductSegment__c = 'BS', |
| | | CloseDate = Date.today(), |
| | | NewInquiryDate__c = Date.today().addDays(-2), |
| | |
| | | EffectiveDate = Date.today(), |
| | | Status = 'Draft', |
| | | Pricebook2Id = pricebook.Id, |
| | | EndUser__c = contact.Id |
| | | EndUser__c = contact.Id, |
| | | EndUserD__c = contact.Id |
| | | ); |
| | | insert order; |
| | | |
| | |
| | | }*/ |
| | | |
| | | @isTest static void test_init2() { |
| | | Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock()); // Update PIPL 20220516 By Chen Yanan |
| | | Id pricebookId = Test.getStandardPricebookId(); |
| | | |
| | | Pricebook2 pricebook = new Pricebook2( |
| | |
| | | EffectiveDate = Date.today(), |
| | | Status = 'Draft', |
| | | Pricebook2Id = pricebook.Id, |
| | | EndUser__c = contact.Id |
| | | EndUser__c = contact.Id, |
| | | EndUserD__c = contact.Id |
| | | ); |
| | | insert order; |
| | | |