Package com.gnizr.db.dao

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


    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

    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

    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

    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

    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

    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

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

    action.setUrl("http://newurl.com");
    action.setOldUrl("http://zirr.us/");
    String result = action.execute();
    assertEquals(ActionSupport.SUCCESS,result);
   
    Bookmark bm = bookmarkManager.getBookmark(300);
    Link link = bm.getLink();
    assertTrue((link.getId() != 202));
    assertEquals("http://newurl.com",link.getUrl());
   
    int bmid = bookmarkManager.getBookmarkId(loggedInUser, "http://zirr.us/");
    assertTrue((bmid <=0));
View Full Code Here

    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());
   
    PointMarker[] resultPtMarkers = action.getPointMarkers();
   
    List<PointMarker> pms = bookmarkManager.getPointMarkers(bm);
    assertEquals(2,pms.size());
View Full Code Here

TOP

Related Classes of com.gnizr.db.dao.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.