function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MohaMoha 

Help with Test Method

Hello i would like to write a testmethod for this method : 


     public string getViewEmailsReport()
    {    
        logo = 'Reportlogo';
       List<Document> lstDocument = [Select Id,Name,LastModifiedById from Document where Name = :logo limit 1]; 
       strOrgId = UserInfo.getOrganizationId();
         String instance =URL.getSalesforceBaseUrl().toExternalForm();
         string strDocUrl = instance + '/servlet/servlet.FileDownload?file='+lstDocument[0].Id;
             return strDocUrl ;
    }

 

anyhelp please, thank you

MohaMoha

is there anyone who got an idea please !!