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
maddy27maddy27 

Wrapper class test coverage

Hi ,

I have 2000 lines of code -

this is one of the methods and condition for but irs not covering the code.
 
public static Boolean validateStreet(string name) {
        Boolean flag = true;
        if(Site.getName() != NULL && Site.getName() != '') {
          return flag;
        }
        if (util.nullCheck(name)) {
            //updated by DYU 04-15-2015 - Update pattern to include "_" for matching
            //String patternName = '([a-zA-Z0-9\\-&\' ]+)';
            String patternName = '([a-zA-Z0-9_\\-&\' ]+)';
            Pattern namePattern = Pattern.compile(patternName);

            Matcher nameMatcher = namePattern.matcher(name.trim());
            flag = nameMatcher.matches();
            
        }
        return flag;
    }
 
Boolean validationResult = true;
     System.debug('***Applicant:' + applicant);
        if (applicant.Title__c == 'Select') {
            this.errorTitle = true;
            this.errorTitleMsg = 'Error: Please select your title.';
            validationResult = false;
        }