• Padmini Sidugonde 6
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi,

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;
    
 }       
    }

 
Hi,

I have written below code in Apex Class. But I am not able to cover this code coverage. Please help on this.
public List<SelectOption> RelatedAccounts
    {
        get{
            system.debug('ACCOUUNTS:' + Accs);
        
            List<SelectOption> options = new List<SelectOption>();
            options.add(new selectOption('--Select--',''));
            
            for(CPF_Relationship__c r : Accs)
            {
                options.add(new SelectOption(r.id,r.child_account__r.name));
            }
            return options;
        }
    }

 
Hi,

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;
    
 }       
    }

 
Hi,

I have written below code in Apex Class. But I am not able to cover this code coverage. Please help on this.
public List<SelectOption> RelatedAccounts
    {
        get{
            system.debug('ACCOUUNTS:' + Accs);
        
            List<SelectOption> options = new List<SelectOption>();
            options.add(new selectOption('--Select--',''));
            
            for(CPF_Relationship__c r : Accs)
            {
                options.add(new SelectOption(r.id,r.child_account__r.name));
            }
            return options;
        }
    }