• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to test HibernateDAO????

 
gopal kishan
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using Hibernate with JSF. I have written my DAO, now i want to test my DAO.

I have written Testcase for my DAO. can you tell me how to run the testcase.
i am using eclipse and i placed junit.jar also. i dont know how to specify my mapping file and others.

This is my code;

public void testOPsProfile(){
MyDAO dao = new HibernateMyDAO();

Object[] object= dao.getAll();
assertTrue(object.length>0);
System.out.println("object size is ::::::::::::::::"+object.length);
}

please let me know , how to test this???

thanks in advance
kishan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic