*/
protected ApplicationContext getContext() {
return new ClassPathXmlApplicationContext("com/javaeye/jert/service/test/BookmarkServiceTest.xml");
}
public void testCRUDBookmarkFolder() throws Exception{
BookmarkFolder folder=new BookmarkFolder();
folder.setName("test for folder");
folder.setUserName("user");
bookmarkFolderService.createBookmarkFolder(folder);
BookmarkFolder storedFolder=bookmarkFolderService.getBookmarkFolder(folder.getId());
assertNotNull(storedFolder);
assertEquals(storedFolder.getName(),folder.getName());
assertEquals(storedFolder.getUserName(),folder.getUserName());
storedFolder.setName("changed");
bookmarkFolderService.updateBookmarkFolder(storedFolder);
BookmarkFolder changedFolder=bookmarkFolderService.getBookmarkFolder(storedFolder.getId());
assertEquals(changedFolder.getName(),"changed");
bookmarkFolderService.deleteBookmarkFolder(changedFolder);
assertNull(bookmarkFolderService.getBookmarkFolder(changedFolder.getId()));
}