assertEquals(1, result.getResult().size());
assertEquals(301, result.getResult().get(0).getId());
}
public void testRemoveBookmarks2() throws Exception {
List<FolderTag> folderTags = folderDao.findTagsInFolder(new Folder(1), 0,FolderDao.SORT_BY_ALPHA,FolderDao.ASCENDING);
assertEquals(3,folderTags.size());
Folder f1 = folderDao.getFolder(1);
assertEquals(3, f1.getSize());
List<Bookmark> bmarks = new ArrayList<Bookmark>();
bmarks.add(new Bookmark(300));
bmarks.add(new Bookmark(303));
bmarks.add(new Bookmark(300));
bmarks.add(new Bookmark(303)); // remove multiple times should cause no error
boolean[] opOkay = folderDao.removeBookmarks(f1, bmarks);
for(boolean b: opOkay){
assertTrue(b);
}
f1 = folderDao.getFolder(1);
assertEquals(1, f1.getSize());
folderTags = folderDao.findTagsInFolder(new Folder(1), 1,FolderDao.SORT_BY_ALPHA,FolderDao.ASCENDING);
assertEquals(2,folderTags.size());
assertEquals(1,folderTags.get(0).getCount());
assertEquals(1,folderTags.get(1).getCount());
bmarks = new ArrayList<Bookmark>();
bmarks.add(new Bookmark(301));
opOkay = folderDao.removeBookmarks(f1, bmarks);
for(boolean b: opOkay){
assertTrue(b);
}
folderTags = folderDao.findTagsInFolder(new Folder(1), 1,FolderDao.SORT_BY_ALPHA,FolderDao.ASCENDING);
assertEquals(0,folderTags.size());
}