@Test public void testDelete() { Bookmark bookmark = new Bookmark("Demoiselle Portal", "http://www.frameworkdemoiselle.gov.br"); bookmarkBC.insert(bookmark); List<Bookmark> listaBookmarks = bookmarkBC.findAll(); assertNotNull(listaBookmarks); assertEquals(1, listaBookmarks.size()); bookmarkBC.delete(bookmark.getId()); listaBookmarks = bookmarkBC.findAll(); assertEquals(0, listaBookmarks.size()); }
@Before public void before() { for (Bookmark bookmark : bookmarkBC.findAll()) { bookmarkBC.delete(bookmark.getId()); } }