Package com.gnizr.db.dao

Examples of com.gnizr.db.dao.Folder


    b = bookmarkManager.getBookmark(303);
    assertNull(b);
  }
 
  public void testDoRemoveFromFolder() throws Exception{
    Folder f = folderManager.getUserFolder(new User(1), "my folder1");
    assertEquals(3,f.getSize());
   
    int[] bmIds = {301,302,303};
   
    action.setLoggedInUser(new User(1));
    action.setOp(new String[]{ManageBookmarks.OP_REMOVE_FROM_FOLDER});
    action.setFolder("my folder1");
    action.setBookmarkId(bmIds);
    String code = action.execute();
    assertEquals(ActionSupport.SUCCESS,code);
   
    f = folderManager.getUserFolder(new User(1), "my folder1");
    assertEquals(0,f.getSize());
  }
View Full Code Here


    f = folderManager.getUserFolder(new User(1), "my folder1");
    assertEquals(0,f.getSize());
  }
 
  public void testDoAddToFolder() throws Exception{
    Folder f = folderManager.getUserFolder(new User(1), "my folder3");
    assertEquals(0,f.getSize());
   
    int[] bmIds = {301,302,303};
   
    action.setLoggedInUser(new User(1));
    action.setOp(new String[]{ManageBookmarks.OP_ADD_TO_FOLDER});
    action.setFolder("my folder3");
    action.setBookmarkId(bmIds);
    String code = action.execute();
    assertEquals(ActionSupport.SUCCESS,code);
   
    f = folderManager.getUserFolder(new User(1), "my folder3");
    assertEquals(3,f.getSize());
  }
View Full Code Here

    f = folderManager.getUserFolder(new User(1), "my folder3");
    assertEquals(3,f.getSize());
  }
 
  public void testDoAddToFolder2() throws Exception{
    Folder f = folderManager.getUserFolder(new User(1), "my folder4");
    assertNull(f);
   
    int[] bmIds = {301,302,303};
   
    action.setLoggedInUser(new User(1));
    action.setOp(new String[]{ManageBookmarks.OP_ADD_TO_FOLDER});
    action.setFolder("my folder4");
    action.setBookmarkId(bmIds);
    String code = action.execute();
    assertEquals(ActionSupport.SUCCESS,code);
   
    f = folderManager.getUserFolder(new User(1), "my folder4");
    assertEquals(3,f.getSize());
  }
View Full Code Here

    assertEquals(1,max);
   
    assertEquals(10,action.getPerPageCount());
    assertEquals(1,action.getPage());
   
    Folder f = action.getFolder();
    assertNotNull(f);
    assertEquals("folder1",f.getName());
   
    List<Bookmark> bmarks = action.getBookmarks();
    assertEquals(4,bmarks.size());   
  }
View Full Code Here

    assertEquals(2,action.getPerPageCount());
    assertEquals(1,action.getPage());
   
    assertEquals(2,session.get(SessionConstants.PAGE_TOTAL_COUNT));
   
    Folder f = action.getFolder();
    assertNotNull(f);
    assertEquals("folder1",f.getName());
   
    List<Bookmark> bmarks = action.getBookmarks();
    assertEquals(2,bmarks.size());     
  }
View Full Code Here

    assertEquals(3,session.get(SessionConstants.PREVIOUS_PAGE_NUM));
    assertEquals(0,session.get(SessionConstants.NEXT_PAGE_NUM));
   
    assertEquals(4,session.get(SessionConstants.PAGE_TOTAL_COUNT));
   
    Folder f = action.getFolder();
    assertNotNull(f);
    assertEquals("folder1",f.getName());
   
    List<Bookmark> bmarks = action.getBookmarks();
    assertEquals(1,bmarks.size());     
  }
View Full Code Here

    assertEquals(0,session.get(SessionConstants.PREVIOUS_PAGE_NUM));
    assertEquals(0,session.get(SessionConstants.NEXT_PAGE_NUM));
   
    assertEquals(4,session.get(SessionConstants.PAGE_TOTAL_COUNT));
   
    Folder f = action.getFolder();
    assertNotNull(f);
    assertEquals("folder1",f.getName());
   
    List<Bookmark> bmarks = action.getBookmarks();
    assertEquals(0,bmarks.size());
  }
View Full Code Here

    assertEquals(3,session.get(SessionConstants.PREVIOUS_PAGE_NUM));
    assertEquals(0,session.get(SessionConstants.NEXT_PAGE_NUM));
   
    assertEquals(4,session.get(SessionConstants.PAGE_TOTAL_COUNT));
   
    Folder f = action.getFolder();
    assertNotNull(f);
    assertEquals("folder1",f.getName());
   
    List<Bookmark> bmarks = action.getBookmarks();
    assertEquals(1,bmarks.size());       
  }
View Full Code Here

    assertEquals(3,session.get(SessionConstants.PREVIOUS_PAGE_NUM));
    assertEquals(0,session.get(SessionConstants.NEXT_PAGE_NUM));
   
    assertEquals(4,session.get(SessionConstants.PAGE_TOTAL_COUNT));
   
    Folder f = action.getFolder();
    assertNotNull(f);
    assertEquals("folder1",f.getName());
   
    List<Bookmark> bmarks = action.getBookmarks();
    assertEquals(1,bmarks.size())
     
  }
View Full Code Here

    initData();
  }
 
  private void initData() throws Exception{
    User user2 = new User(2);
    Folder xFolder = folderManager.createFolder(user2, "x-folder", "");
    List<Bookmark> bmarks = new ArrayList<Bookmark>();
    bmarks.add(new Bookmark(307));
    bmarks.add(new Bookmark(305));
   
    boolean[] opOkay = folderManager.addBookmarks(user2, "x-folder",bmarks);
    for(boolean b : opOkay){
      assertTrue(b);
    }
   
    xFolder = folderManager.getUserFolder(user2, "x-folder");
    assertEquals(2,xFolder.getSize());
  }
View Full Code Here

TOP

Related Classes of com.gnizr.db.dao.Folder

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.