1) My action class contain something like this
public
String login()
{
Create object of DAO class(DAOref)
int temp=DAOref.validate(username,password);
if(temp==1)
{
return "ABC";
}
if(temp==2)
{
return "XYZ";
}
}
2) My DAO class coantain something like this
public int validate( String username, String password)
{
validate username & password with database & return corrosponding id;
return id;
}
How we can test above action class & DAO class?