0

I am using a wrapper class (inner class) as below,

public without sharing class wmp_ctrl_NotificationHeader {

// other methods 
// 

 public class NotificationsWrapper{
        @AuraEnabled
        public List<Alerts__c> allNotifications; 
        @AuraEnabled
        public Integer unreadAlertSize;
    }
}

How can i cover test coverage for the wrapper class which has only these varibles?

0

How can i cover test coverage for the wrapper class which has only these varibles?

You can't. Variable declarations outside a method cannot be covered, and do not count for, or against, code coverage requirements. A class with no coverable lines will show coverage as 0% or NaN% (in DX), but will still successfully deploy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.