/** Test method for {@link net.bioclipse.brunn.daos.CellOriginDAO#getById(long)}. */ @Test public void testGetById() { CellOrigin cellOrigin = new CellOrigin(tester, "cellOrigin"); getDAO().save(cellOrigin); session.flush(); session.clear(); CellOrigin savedCellOrigin = getDAO().getById(new Long(cellOrigin.getId())); assertEquals(cellOrigin, savedCellOrigin); assertNotSame(cellOrigin, savedCellOrigin); }
@Test public void testDelete() { CellOrigin cellOrigin = new CellOrigin(tester, "cell origin"); assertFalse(cellOrigin.isDeleted()); getDAO().save(cellOrigin); session.flush(); session.clear(); getDAO().delete(cellOrigin); session.flush(); session.clear(); CellOrigin deleted = getDAO().getById(new Long(cellOrigin.getId())); assertTrue(deleted.isDeleted()); }