Examples of Bookmark


Examples of com.gnizr.db.dao.Bookmark

  }
 
  private void initFolderData() throws Exception{
    folderManager.createFolder(new User("hchen1"), "folder1", "");
    List<Bookmark> bookmarks = new ArrayList<Bookmark>();
    bookmarks.add(new Bookmark(300));
    bookmarks.add(new Bookmark(301));
    bookmarks.add(new Bookmark(302));
    bookmarks.add(new Bookmark(303));
   
    folderManager.addBookmarks(new User("hchen1"), "folder1", bookmarks);
  }
View Full Code Here

Examples of com.gnizr.db.dao.Bookmark

    String r = action.execute();
    assertEquals(ActionSupport.SUCCESS,r);
   
    List<Bookmark> bmarks = action.getBookmarks();
    assertEquals(1,bmarks.size());
    Bookmark b = bmarks.get(0);
    assertEquals(302,b.getId());   
  }
View Full Code Here

Examples of com.gnizr.db.dao.Bookmark

    action.setTitle("CNN News Home Page");
    action.setLoggedInUser(loggedInUser);
    String result = action.doFetchBookmark();
    assertEquals(ActionSupport.SUCCESS,result);
   
    Bookmark bm = action.getEditBookmark();
    assertNotNull(bm);
   
    assertEquals("http://cnn.com",bm.getLink().getUrl());
    assertEquals("cnn news",bm.getTags());
    assertEquals("CNN News Home Page",bm.getTitle());
  }
View Full Code Here

Examples of com.gnizr.db.dao.Bookmark

    assertEquals("cnn news",bm.getTags());
    assertEquals("CNN News Home Page",bm.getTitle());
  }
 
  public void testDeleteBookmark1() throws Exception{
    Bookmark bm = bookmarkManager.getBookmark(300);
    assertNotNull(bm);   
   
    User loggedInUser = userManager.getUser("gnizr");
    action.setLoggedInUser(loggedInUser);
    action.setUrl("http://zirr.us/");
View Full Code Here

Examples of com.gnizr.db.dao.Bookmark

    assertNull(bm);       
  }
 
 
  public void testDeleteBookmark2() throws Exception{
    Bookmark bm = bookmarkManager.getBookmark(300);
    assertNotNull(bm);   
   
    User loggedInUser = userManager.getUser("hchen1");
    action.setLoggedInUser(loggedInUser);
    action.setUrl("http://zirr.us/");
View Full Code Here

Examples of com.gnizr.db.dao.Bookmark

    bm = bookmarkManager.getBookmark(300);
    assertNotNull(bm);       
  }
 
  public void testDeleteBookmark3() throws Exception{
    Bookmark bm = bookmarkManager.getBookmark(300);
    assertNotNull(bm);   
   
    User loggedInUser = userManager.getUser("hchen1");
    action.setLoggedInUser(loggedInUser);
    String result = action.doDeleteBookmark();
View Full Code Here

Examples of com.gnizr.db.dao.Bookmark

    String result = action.execute();
    assertEquals(ActionSupport.SUCCESS,result);

    int bmid = bookmarkManager.getBookmarkId(loggedInUser, "http://cnn.com");
    assertTrue(bmid > 0);
    Bookmark bm = bookmarkManager.getBookmark(bmid);
    assertEquals("CNN homepage",bm.getTitle());
    assertEquals("",bm.getNotes());
  }
View Full Code Here

Examples of com.gnizr.db.dao.Bookmark

    String result = action.execute();
    assertEquals(ActionSupport.SUCCESS,result);

    int bmid = bookmarkManager.getBookmarkId(loggedInUser, "http://cnn.com");
    assertTrue(bmid > 0);
    Bookmark bm = bookmarkManager.getBookmark(bmid);
    assertEquals("CNN homepage",bm.getTitle());
    assertEquals("notes goes here... <H3>233</H3>",bm.getNotes().trim());
  }
View Full Code Here

Examples of com.gnizr.db.dao.Bookmark

    action.setTags("abc");
    action.setUrl("http://zirr.us/");
    String result = action.execute();
    assertEquals(ActionSupport.SUCCESS,result);
   
    Bookmark bm = bookmarkManager.getBookmark(300);
    assertEquals("abc",bm.getTags());
  }
View Full Code Here

Examples of com.gnizr.db.dao.Bookmark

    action.setTitle("abc title and abc title");
    action.setUrl("http://zirr.us/");
    String result = action.execute();
    assertEquals(ActionSupport.SUCCESS,result);
   
    Bookmark bm = bookmarkManager.getBookmark(300);
    assertEquals("abc",bm.getTags());
    assertEquals("abc title and abc title",bm.getTitle());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.