You need to sign in to do that
Don't have an account?

Can anyone help me to get code coverage for the following code
public void createorderline()
{
if(orderid == '' && orderid == null)
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Please save the Order to proceed..'));
else {
orderline__c ol =new orderline__c();
ol.Status__c ='Pending Submission';
if(ol.Order_Price__r.product__r.name!=null)
oderlinelist.add(new neworderlist(ol,ol.Order_Price__r.product__r.name,0.0,0.0));
else {
system.debug('inside else*************');
string temp='';
oderlinelist.add(new neworderlist(ol,temp,0.0,0.0));
}
}
}
Thanks much in advance...
Hi,
try below test class.
Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator
Hi,
Try the following test class