Please find the solution. "write a test class for given class".
I think "SObjectPageInfoWrapper" is also a wrapper but you did not provide us code for this wrapper.
I have written a Test class with 100% coverage. Please take Reference from this code
Class :
public class MasterPageWrapper {
public SObjectPageInfoWrapper objParentFieldDetails {get;set;}
public Map<String,SObjectPageInfoWrapper> childRelatedFieldDetailsMap {get;set;}
public MasterPageWrapper(SObjectPageInfoWrapper objParentFieldDetails, Map<String,SObjectPageInfoWrapper> childRelatedFieldDetailsMap){
this.objParentFieldDetails = objParentFieldDetails;
this.childRelatedFieldDetailsMap = childRelatedFieldDetailsMap;
}
public class SObjectPageInfoWrapper{
public string name{get;set;}
public Integer count{get;set;}
public Account ac;
}
}
public SObjectPageInfoWrapper objParentFieldDetails {get;set;}
public Map<String,SObjectPageInfoWrapper> childRelatedFieldDetailsMap {get;set;}
public MasterPageWrapper(SObjectPageInfoWrapper objParentFieldDetails, Map<String,SObjectPageInfoWrapper> childRelatedFieldDetailsMap){
this.objParentFieldDetails = objParentFieldDetails;
this.childRelatedFieldDetailsMap = childRelatedFieldDetailsMap;
}
}
Hi Shivani,
Please find the solution. "write a test class for given class".
I think "SObjectPageInfoWrapper" is also a wrapper but you did not provide us code for this wrapper.
I have written a Test class with 100% coverage. Please take Reference from this code
Class :
Test Class :
Please let me know it is working or not??
If it helps you please mark it as Best Answer so that other people would take reference from it.
Thank You!