/** Ensures that, if the id is valid, then retrieving a bookmark works as expected. */ @Test public void testGet() { Bookmark result = dao.get(existing_bookmark.getId()); assertNotNull(result); assertEquals(existing_bookmark.getId(), result.getId()); }
/** Ensures that removing a bookmark works as expected. */ @Test public void testRemove() { dao.remove(existing_bookmark.getId()); Bookmark result = dao.get(existing_bookmark.getId()); assertNull(result); }
/** Ensures that updating a bookmark works as expected. */ @Test public void testUpdate() { existing_bookmark.setName(existing_bookmark.getName().toUpperCase()); dao.update(existing_bookmark); Bookmark result = dao.get(existing_bookmark.getId()); assertNotNull(result); assertEquals(existing_bookmark.getName(), result.getName()); }