In the DAO a query returns me and List<Object[]>
I have made a been ABC which has
protected String Name;
protected Integer AGE;
and the getters and setters for it.
This is my DAO Method
List<ABC> list = new ArrayList<ABC>();
if(result!=null && !result.isEmpty())
{
Iterator dataIter = result.iterator();
while(dataIter.hasNext())
{
Object[] row = (Object[]) dataIter.next();
ABC abc = new ABC();
abc.setName((String)row[0]);
abc.setAGE((Integer)row[1]);
list.add(abc);
}
}
return list;
How can I Write JUNit test for this method. Through Junit I can check whether the return list is empty or not but what if I want to check what is there in the list.