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

Pattern and Mattcher in Unit Test

Hi Everyone,
i am usising Pattern and Matcher Functions in class and need some direction to cover that part of the code in unit test. i am unable to cover the below code.

        if(mapOrpIdWithContentId.get(r.Orphan__c)!= null)
             Matcher MatcherOrpPicture = PatternOrpPicture.matcher(CV_FileName.title+'.'+CV_FileName.FileExtension);   
       			 if (MatcherOrpPicture.matches())
 					r.Orphan_Image__c = SetImageURL + mapOrpIdWithContentId.get(r.Orphan__c);
User-added image
thanks in Advance