@Test public void get() { final PublicMessage pm = getPublicMessage(1).get(0); session.save(pm); assertEquals(publicMessageDao.get(pm.getId()), pm); }
@Test public void create() { final PublicMessage pm = getPublicMessage(1).get(0); publicMessageDao.save(pm); session.evict(pm); assertEquals(session.get(PublicMessage.class, pm.getId()), pm); }
@Test public void deleteByObject() { final PublicMessage pm = getPublicMessage(1).get(0); session.save(pm); session.evict(pm); publicMessageDao.delete(pm); assertNull(session.get(PublicMessage.class, pm.getId())); }