1

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?

1 Answer 1

1

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.

1
  • What a relief to hear!
    – compski
    Commented Jan 26, 2022 at 7:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .