You need to sign in to do that
Don't have an account?
Harsha Shri
Need help in test class for List and Map
Hi All,
I need help in test class for List and Map. I am adding values into list and returning map as list.
This is my controller class
Please help in wirtitng test class for this.
Thank you in Advance
I need help in test class for List and Map. I am adding values into list and returning map as list.
This is my controller class
public class viewMethod { public viewWrapper initViewWrapper(){ viewWrapper viewWrapper=new viewWrapper(); viewWrapper.searchOptions=new List<SelectOption>(); viewWrapper.searchOptions.add(new SelectOption('CEO','CEO')); viewWrapper.searchOptions.add(new SelectOption('Manager','Manager')); return viewWrapper; } public viewWrapper dataview(responseWrap.resp iResp){ viewWrapper viewWrapper=null; if(iResp!=null){ } return viewWrapper; } public List<Map<String,String>> DataasList(responseWrap.resp iResp){ List<Map<String,String>> mapList=new List<Map<String,String>>(); Map<String,String> recMap=null; if(iResp!=null){ responseWrap.SearchResponse searchResp=(responseWrap.SearchResponse) iResp; List<responseWrap.Order_Output> OList=searchResp.Order_Output; if(!OList.isEmpty()){ for(responseWrap.Order_Output res: OList){ recMap=new Map<String,String>(); recMap.put('Country',res.country); recMap.put('State',res.state); mapList.add(recMap); } } } return mapList; } }
Please help in wirtitng test class for this.
Thank you in Advance