You need to sign in to do that
Don't have an account?
Aditya Chauhan 10
test class on opportunity
if(mapOldOpp != null && opp.stageName != mapOldOpp.get(opp.Id).stageName && opp.stageName == PROJECT_STAGE_PENDING_APPROVAL && setRecTypeID.contains(opp.RecordTypeID)){
setOppDOAId.add(opp.Id);
}
if(mapOldOpp != null && opp.stageName != mapOldOpp.get(opp.Id).stageName && opp.stageName == PROJECT_STAGE_APPROVED_FOR_PAYMENT && setRecTypeID.contains(opp.RecordTypeID)){
setOppPaymentId.add(opp.Id);
}
}
system.debug ('@@@ setOppDOAId : ' + setOppDOAId);
system.debug ('@@@ setOppPaymentId : ' + setOppPaymentId);
//
if(setOppPaymentId != null && !setOppPaymentId.isEmpty()){
Set<String> pmStatusSet = new Set<String>{'Withdrawn', 'Rejected'};
list<OpportunityLineItem>lstOppLine = [select id,ESA_Total_Approved_Cost_EI__c,Opportunity.Program_EI__c, Opportunity.Program_EI__r.Pgm_Code_EI__c,
Opportunity.ImplementerAccount_EI__c, Opportunity.ImplementerAccount_EI__r.Vendor_Number_EI__c,
Opportunity.ContractorAccount_EI__c, Opportunity.ContractorAccount_EI__r.Vendor_Number_EI__c,
ESA_Order_Number_EI__c,GL_Account_Code__c,Measure_Code_EI__c,Payment_EI__c,
Payee_Attention_To_EI__c, Payee_EI__c, Payee_Mailing_Add_EI__c, Payee_Mailing_City_EI__c,
Payee_Mailing_State__c, Payee_Mailing_Zip_EI__c, Opportunity.RecordType.DeveloperName,
Opportunity.Name
from OpportunityLineItem
where OpportunityId IN : setOppPaymentId AND Payment_EI__c = null
AND Project_Measure_Status_EI__c NOT IN : pmStatusSet limit 10000];
map<string,decimal>mapImplementorOrderTotalCost = new map<string,decimal>();
map<string, OpportunityLineItem> mapImplementorOrderLine = new map<string, OpportunityLineItem>();
string keyVal ='', keyVal1 = '', keyVal2 = '';
String sysAdminError = '';
I have to write a test class,Can anyone help me to cover this part?
setOppDOAId.add(opp.Id);
}
if(mapOldOpp != null && opp.stageName != mapOldOpp.get(opp.Id).stageName && opp.stageName == PROJECT_STAGE_APPROVED_FOR_PAYMENT && setRecTypeID.contains(opp.RecordTypeID)){
setOppPaymentId.add(opp.Id);
}
}
system.debug ('@@@ setOppDOAId : ' + setOppDOAId);
system.debug ('@@@ setOppPaymentId : ' + setOppPaymentId);
//
if(setOppPaymentId != null && !setOppPaymentId.isEmpty()){
Set<String> pmStatusSet = new Set<String>{'Withdrawn', 'Rejected'};
list<OpportunityLineItem>lstOppLine = [select id,ESA_Total_Approved_Cost_EI__c,Opportunity.Program_EI__c, Opportunity.Program_EI__r.Pgm_Code_EI__c,
Opportunity.ImplementerAccount_EI__c, Opportunity.ImplementerAccount_EI__r.Vendor_Number_EI__c,
Opportunity.ContractorAccount_EI__c, Opportunity.ContractorAccount_EI__r.Vendor_Number_EI__c,
ESA_Order_Number_EI__c,GL_Account_Code__c,Measure_Code_EI__c,Payment_EI__c,
Payee_Attention_To_EI__c, Payee_EI__c, Payee_Mailing_Add_EI__c, Payee_Mailing_City_EI__c,
Payee_Mailing_State__c, Payee_Mailing_Zip_EI__c, Opportunity.RecordType.DeveloperName,
Opportunity.Name
from OpportunityLineItem
where OpportunityId IN : setOppPaymentId AND Payment_EI__c = null
AND Project_Measure_Status_EI__c NOT IN : pmStatusSet limit 10000];
map<string,decimal>mapImplementorOrderTotalCost = new map<string,decimal>();
map<string, OpportunityLineItem> mapImplementorOrderLine = new map<string, OpportunityLineItem>();
string keyVal ='', keyVal1 = '', keyVal2 = '';
String sysAdminError = '';
I have to write a test class,Can anyone help me to cover this part?
You can write something like that / need to be completed :