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