| | |
| | | /** |
| | | * @description : |
| | | * @author : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | * @group : |
| | | * @last modified on : 04-21-2022 |
| | | * @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | **/ |
| | | @isTest |
| | | private class OpportunityTriggerTest { |
| | | |
| | |
| | | StaticParameter.OpportunityTriggerIsUpdate = true; |
| | | List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE']; |
| | | Account accIE = new Account( |
| | | Name = '*', |
| | | Name = 'test', |
| | | RecordTypeId = rectIE[0].Id, |
| | | OwnerId = UserInfo.getUserId(), |
| | | DivisionName__c='Customer IE', |
| | |
| | | |
| | | List<RecordType> rectOpp = [select id from RecordType where IsActive = true and SobjectType = 'Opportunity']; |
| | | Opportunity opp = new Opportunity( |
| | | Name = 'test opp', |
| | | Name = 'test', |
| | | AccountId = accIE.Id, |
| | | RecordTypeId = rectOpp[0].Id, |
| | | OwnerId = UserInfo.getUserId(), |
| | |
| | | insert role; |
| | | |
| | | Order odr = new Order( |
| | | Name = '', |
| | | Name = 'test', |
| | | Status = 'Draft', |
| | | Status__c = 'Active', |
| | | AccountId = accIE.Id, |
| | |
| | | IE_SP8__c = true, |
| | | SpecialDeliveryAccount_D__c = accIE.Id, |
| | | SpecialDeliveryContact2_D__c = con.Id, |
| | | EndUser__c = con.Id |
| | | EndUser__c = con.Id, |
| | | EndUserD__c = con.Id |
| | | ); |
| | | insert odr; |
| | | opp.Name = 'test'; |