Package com.gnizr.db.dao

Examples of com.gnizr.db.dao.Folder


    assertEquals("cnn",fldrTgs.get(2).getTag().getLabel());
    assertEquals(1,fldrTgs.get(2).getTag().getCount());
  }
 
  public void testFindTagsInFolder3() throws Exception{
    List<FolderTag> fldrTgs = folderDao.findTagsInFolder(new Folder(1),
        0, FolderDao.SORT_BY_USAGE_FREQ, FolderDao.DESCENDING);
    assertEquals(3,fldrTgs.size());
   
    assertEquals(3,fldrTgs.get(0).getCount());
    assertEquals(3,fldrTgs.get(1).getCount());
View Full Code Here


    assertEquals(3,fldrTgs.get(1).getCount());
    assertEquals(1,fldrTgs.get(2).getCount());   
  }
 
  public void testFindTagsInFolder4() throws Exception{
    List<FolderTag> fldrTgs = folderDao.findTagsInFolder(new Folder(1),
        2, FolderDao.SORT_BY_ALPHA, FolderDao.DESCENDING);
    assertEquals(2,fldrTgs.size());
   
    assertEquals(3,fldrTgs.get(0).getCount());   
    assertEquals(3,fldrTgs.get(1).getCount());   
View Full Code Here

    return new FlatXmlDataSet(TestFolderManager.class
        .getResourceAsStream("/TestFolderManager-input.xml"));
  }
 
  public void test1GetUserFolder() throws Exception{
    Folder f1 = folderManager.getUserFolder(new User("jsmith"), "my folder1");
    assertEquals(3,f1.getSize());
   
    Folder fx = folderManager.getUserFolder(new User("jsmith"), "my folder1 fjfjfjf");
    assertNull(fx);
  }
View Full Code Here

    Folder fx = folderManager.getUserFolder(new User("jsmith"), "my folder1 fjfjfjf");
    assertNull(fx);
  }
 
  public void testDeleteUserFolder() throws Exception{
    Folder f1 = folderManager.getUserFolder(new User("jsmith"), "my folder1");
    assertEquals(3,f1.getSize());
    boolean ok = folderManager.deleteUserFolder(new User("jsmith"), "my folder1");
    assertTrue(ok);
   
    f1 = folderManager.getUserFolder(new User("jsmith"), "my folder1");
    assertNull(f1);
View Full Code Here

    f1 = folderManager.getUserFolder(new User("jsmith"), "my folder1");
    assertNull(f1);
  }
 
  public void testPurgeUserFolder() throws Exception{
    Folder f1 = folderManager.getUserFolder(new User("jsmith"), "my folder1");
    int size = f1.getSize();
    assertTrue(f1.getSize() > 0);
    int cnt = folderManager.purgeFolder(new User("jsmith"), "my folder1");
    assertEquals(size,cnt);
  }
View Full Code Here

    cnt = folderManager.getUserFolderCount(new User(2));
    assertEquals(3,cnt);
  }
 
  public void testCreateFolder() throws Exception{
    Folder f1 = folderManager.createFolder(new User(2), "my folder1", "foo");
    assertNotNull(f1);
    assertEquals(1,f1.getId());
    assertEquals(3,f1.getSize());
    assertEquals("my folder1",f1.getName());
   
    int cnt = folderManager.getUserFolderCount(new User(2));
    assertEquals(3, cnt);
   
    Folder fXYZ = folderManager.createFolder(new User("jsmith"), "Project XYZ", "stuff");
    assertNotNull(fXYZ);
    assertEquals("Project XYZ",fXYZ.getName());
    assertEquals("stuff",fXYZ.getDescription());
  }
View Full Code Here

    cnt = feedManager.removeImportFolders(feedOwner,feedUrl,new User("jsmith"),folder2rm);
    assertEquals(1,cnt);
   
    folders = feedManager.listImportFolder(feedOwner, feedUrl);
    assertEquals(1,folders.size());
    Folder f =folders.get(0);
    assertEquals(2,f.getId());
    assertEquals("my folder2", f.getName());
  }
View Full Code Here

    assertEquals("stuff",fXYZ.getDescription());
  }
 
 
  public void testAddBookmarks() throws Exception{
    Folder myFolder = folderManager.createFolder(new User("hchen1"), "Harry's Folder", "");
   
    List<Bookmark> bmarks = new ArrayList<Bookmark>();
    bmarks.add(new Bookmark(300));
    boolean[] opOkay = folderManager.addBookmarks(new User("hchen1"), "Harry's Folder", bmarks);
    assertTrue(opOkay[0]);
   
    myFolder = folderManager.createFolder(new User("hchen1"), "Harry's Folder", "");
    assertEquals(1,myFolder.getSize());
   
    Bookmark bm300 = bookmarkDao.getBookmark(300);
    assertTrue(bm300.getFolderList().contains("Harry's Folder"));
    assertTrue(bm300.getFolderList().contains("my folder1"));
  }
View Full Code Here

    assertTrue(bm300.getFolderList().contains("Harry's Folder"));
    assertTrue(bm300.getFolderList().contains("my folder1"));
  }
 
  public void testRemoveBookmarks() throws Exception {
    Folder f1 = folderManager.createFolder(new User("jsmith"), "my folder1","");
    assertEquals(3,f1.getSize());
   
    List<Bookmark> bmarks = new ArrayList<Bookmark>();
    bmarks.add(new Bookmark(300));
    bmarks.add(new Bookmark(301));
   
    boolean[] opOkay = folderManager.removeBookmarks(new User("jsmith"), "my folder1", bmarks);
    for(boolean b : opOkay){
      assertTrue(b);
    }
   
    f1 = folderManager.createFolder(new User("jsmith"), "my folder1","");
    assertEquals(1,f1.getSize());
  }
View Full Code Here

    f1 = folderManager.createFolder(new User("jsmith"), "my folder1","");
    assertEquals(1,f1.getSize());
  }
 
  public void testUpdateUserFolder() throws Exception{
    Folder f1 = folderManager.getUserFolder(new User("jsmith"), "my folder1");
    f1.setDescription("new dsp");
    f1.setName("new title");
    boolean isOkay = folderManager.updateFolder(new User("jsmith"), f1);
    assertTrue(isOkay);
  }
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.