@After public void tearDown() { Session session = HibernateUtils.getCurrentSession(); session.beginTransaction(); session.createQuery("delete from Todo").executeUpdate(); session.getTransaction().commit(); HibernateUtils.closeSession(); }
@Before public void setUp() { Session session = HibernateUtils.getCurrentSession(); session.beginTransaction(); todoService = new TodoServiceImpl(); }