Package com.javaeye.jert.domain.bookmark

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


    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);
        bookmarkService.createBookmark(bm);
        Bookmark storedbm=bookmarkService.getBookmark(bm.getId());
        assertNotNull(storedbm);
        assertEquals(storedbm.getName(),bm.getName());
        assertEquals(storedbm.getQueryString(),bm.getQueryString());
        storedbm.setName("changed");
        bookmarkService.updateBookmark(storedbm);
        Bookmark changedbm=bookmarkService.getBookmark(storedbm.getId());
        assertEquals(changedbm.getName(),"changed");
        bookmarkService.deleteBookmark(changedbm);
        bookmarkFolderService.deleteBookmarkFolder(folder);
        assertNull(bookmarkService.getBookmark(changedbm.getId()));
    }
View Full Code Here


    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);
        bookmarkService.createBookmark(bm);
        Bookmark storedbm=bookmarkService.getBookmark(bm.getId());
        assertNotNull(storedbm);
        assertEquals(storedbm.getName(),bm.getName());
        assertEquals(storedbm.getQueryString(),bm.getQueryString());
        assertEquals(storedbm.hashCode(),bm.hashCode());
       
    }
View Full Code Here

TOP

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

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.