Package com.javaeye.jert.domain.bookmark

Examples of com.javaeye.jert.domain.bookmark.BookmarkFolder


     */
    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()));
       
    }
View Full Code Here


        bookmarkFolderService.deleteBookmarkFolder(changedFolder);
        assertNull(bookmarkFolderService.getBookmarkFolder(changedFolder.getId()));
       
    }
    public void testCRUDBookmark() throws Exception{
        BookmarkFolder folder=new BookmarkFolder();
        folder.setName("test for folder");
        folder.setUserName("user");
        bookmarkFolderService.createBookmarkFolder(folder);
        Bookmark bm=new Bookmark();
        bm.setName("test for bookmark");
        bm.setQueryString("http://test/");
        bm.setBookmarkFolder(folder);
View Full Code Here

        bookmarkService.deleteBookmark(changedbm);
        bookmarkFolderService.deleteBookmarkFolder(folder);
        assertNull(bookmarkService.getBookmark(changedbm.getId()));
    }
    public void testForTest() throws Exception{
        BookmarkFolder folder=new BookmarkFolder();
        folder.setName("test for folder");
        folder.setUserName("user");
        bookmarkFolderService.createBookmarkFolder(folder);
        Bookmark bm=new Bookmark();
        bm.setName("test for bookmark");
        bm.setQueryString("http://test/");
        bm.setBookmarkFolder(folder);
View Full Code Here

        assertEquals(storedbm.hashCode(),bm.hashCode());
       
    }
    public void testGetBookmarkFoldersByUser() throws Exception{
        String userName="user";     
        BookmarkFolder folder1=new BookmarkFolder();
        folder1.setName("test for folder1");
        folder1.setUserName(userName);
        BookmarkFolder folder2=new BookmarkFolder();
        folder2.setName("test for folder2");
        folder2.setUserName(userName);
        BookmarkFolder folder3=new BookmarkFolder();
        folder3.setName("test for folder3");
        folder3.setUserName(userName);
        bookmarkFolderService.createBookmarkFolder(folder1);
        bookmarkFolderService.createBookmarkFolder(folder2);
        bookmarkFolderService.createBookmarkFolder(folder3);
        List folders=bookmarkFolderService.getBookmarkFoldersByUserName(userName);
        assertEquals(folders.size(),3);
View Full Code Here

        else
            return folders;
       
    }
    private void createDefaultBMFolder(String userName){
        BookmarkFolder folder=new BookmarkFolder();
        folder.setUserName(userName);
        folder.setName(BookmarkFolder.DEFAULTNAME);
        this.createBookmarkFolder(folder);
    }
View Full Code Here

TOP

Related Classes of com.javaeye.jert.domain.bookmark.BookmarkFolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.