Examples of ArticleDao


Examples of dao.ArticleDao

    @Test
    public void testThatSetupInitializationCreatesTheTestUsers(){
        // Get the application injector
        Injector applicationInjector = getInjector();
        // Access internal dao
        ArticleDao articleDao = applicationInjector.getInstance(ArticleDao.class);
        // check that articles are setup
        assertEquals(articleDao.getAllArticles().articles.size(), 3);
    }
View Full Code Here

Examples of daos.ArticleDao

        // Create elasticsearch server
        ElasticSearchManager esManager = new ElasticSearchManager(configuration.datadir);
        environment.manage(esManager);

        // Create daos
        ArticleDao articleDao = new ArticleDaoImpl(esManager.getNode(), getJson());
        UserDao userDao = new UserDaoImpl(esManager.getNode(), getJson());

        // Create caching authenticator
        CachingAuthenticator<BasicCredentials, User> authenticator = CachingAuthenticator.wrap(new ElasticSearchAuthenticator(userDao),
                CacheBuilderSpec.parse("maximumSize=5,expireAfterAccess=5m"));
View Full Code Here

Examples of kr.pe.okjsp.ArticleDao

    article.setSubject(subject);
    article.setHomepage(homepage);
    article.setPassword(password);
    article.setCcl_id(ccl_id);
   
    new ArticleDao().write(article);
   
    return article.getBbs();
  }
View Full Code Here

Examples of kr.pe.okjsp.ArticleDao

    // login check
    Member member = TestObject.getTestMember();

    // �۾��� 10��, code 2
    long pointBefore =  pointDao.getPoint(member.getSid());
    ArticleDao articleDao = new ArticleDao();
    Article article = new Article();
    Connection conn = new DbCon().getConnection();
    int seq = articleDao.getSeq(conn);
    article.setSeq(seq);
    article.setBbs("perf");
    article.setSubject("subject");
    article.setId(member.getId());
    article.setSid(member.getSid());
    article.setContent("content");
    article.setWriter(member.getId());
    int result = articleDao.write(conn , article);
    assertTrue(1 < result);
    long pointAfter = pointDao.getPoint(member.getSid());
    assertEquals(10, pointAfter - pointBefore);
  }
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.