You need to sign in to do that
Don't have an account?
Padmini Sidugonde 6
Not able to cover method variable in test class
Hi,
I have below apex class which i am not able to cover in test class.
I have below apex class which i am not able to cover in test class.
public class createdoc { public PageReference CreateDocument() { product pr = [select id, Limited_Company_App_Form__c from product where id=:opp.product__c]; docsetting sett = new docsetting (pr.Limited_Company_App_Form__c ); string body= sett.Calldoc(opportunityId); if(sett.AttachmentId != null) { Opp.Attachment_App_Form__c = sett.AttachmentId; update opp; } return null; } }
Please share your test class code.
Regards
Mukesh
can you try below code in your test class
createdoc docReference= new createdoc(new ApexPages.StandardController(new Object_Name()));
docReference.CreateDocument();
(or)
Can you please provide the full code of apex class and Visualforce Page so that it is easy to resolve.
Please let me know if any help required.
Thanks & Regards
Madhukar_heptarc
This is my test class. Here docsetting class is other helper apex class. I have tried but not covering the helper class.
Thanks in Advance.