Package com.gnizr.db.dao.user

Examples of com.gnizr.db.dao.user.UserDBDao


    return new FlatXmlDataSet(TestForUserDBDao.class.getResourceAsStream("/dbunit/foruserdbdao/TestForUserDBDao1-input.xml"));
  }

  public void testAddForUser() {
    // Test fresh creation
    UserDBDao userDao = new UserDBDao(getDataSource());
    User user = userDao.getUser((1));
    assertNotNull(user);
   
    BookmarkDBDao bmDao = new BookmarkDBDao(getDataSource());
   
    Bookmark bookmark = bmDao.getBookmark(301);
View Full Code Here


    User buser = forUser.getBookmark().getUser();
    assertEquals("jsmith",buser.getUsername());   
  }

  public void testPageForUser() {
    UserDBDao userDao = new UserDBDao(getDataSource());
    User user = userDao.getUser((2));
    assertNotNull(user);
   
    List<ForUser> bookmarks = fuDao.pageForUser(user, 0, 2);
   
    assertTrue (bookmarks.size()==2);
View Full Code Here

    assertTrue (forUser.getMessage().equals(newForUser.getMessage()));
  }
 
  public void testHasForUser ()
  {
    UserDBDao userDao = new UserDBDao(getDataSource());
    User user = userDao.getUser((2));
    assertNotNull(user);
   
    BookmarkDBDao bmDao = new BookmarkDBDao(getDataSource());
    Bookmark bookmark = bmDao.getBookmark(301);
    assertNotNull(bookmark);
View Full Code Here

  public void testCreateBookmark() throws Exception{
    LinkDBDao linkDao = new LinkDBDao(getDataSource());
    Link link = linkDao.getLink((202));
    assertNotNull(link);
   
    UserDBDao userDao = new UserDBDao(getDataSource());
    User user = userDao.getUser((1));
    assertNotNull(user);
   
    Bookmark bm = new Bookmark();
    bm.setCreatedOn(Calendar.getInstance().getTime());
    bm.setLastUpdated(Calendar.getInstance().getTime());
View Full Code Here

   */
  public static final GnizrDao getInstance(DataSource datasource){
    if(gnizrDao == null){
      gnizrDao = new GnizrDao();
      gnizrDao.setBookmarkDao(new BookmarkDBDao(datasource));
      gnizrDao.setUserDao(new UserDBDao(datasource));
      gnizrDao.setLinkDao(new LinkDBDao(datasource));
      gnizrDao.setTagDao(new TagDBDao(datasource));
      gnizrDao.setFeedSubscriptionDao(new FeedSubscriptionDBDao(datasource));
      gnizrDao.setForUserDao(new ForUserDBDao(datasource));
      gnizrDao.setTagAssertionDao(new TagAssertionDBDao(datasource));
View Full Code Here

      dataSource.setDriverClassName("com.mysql.jdbc.Driver");
    }
   
    gnizrDBDao = new GnizrDao();
    gnizrDBDao.setBookmarkDao(new BookmarkDBDao(dataSource));
    gnizrDBDao.setUserDao(new UserDBDao(dataSource));
    gnizrDBDao.setLinkDao(new LinkDBDao(dataSource));
    gnizrDBDao.setTagDao(new TagDBDao(dataSource));
    gnizrDBDao.setTagPropertyDao(new TagPropertyDBDao(dataSource));
    gnizrDBDao.setTagAssertionDao(new TagAssertionDBDao(dataSource));
    gnizrDBDao.setFeedSubscriptionDao(new FeedSubscriptionDBDao(dataSource));
View Full Code Here

TOP

Related Classes of com.gnizr.db.dao.user.UserDBDao

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.