Package models

Examples of models.ArticleComment


        article.save();
       
        // Non activity for the article
        assertEquals(0, Activity.count("article = ?", article));
       
        ArticleComment c = new ArticleComment(member, article, "Un commentaire");
        article.addComment(c);
        article.save();
       
        // One activity for the article
        assertEquals(1, Activity.count("article = ?", article));
View Full Code Here


        article.save();
       
        // No activity for the article
        assertEquals(0, Activity.count("article = ?", article));
       
        ArticleComment c = new ArticleComment(member, article, "Un commentaire");
        article.addComment(c);
        article.save();
       
        // Still no activity for the article
        assertEquals(0, Activity.count("article = ?", article));
View Full Code Here

        }
    }

    protected void comment(Member m, Article a, final int nbComments) {
        for (int i = 0; i < nbComments; i++) {
            a.addComment(new ArticleComment(member, a, "Un commentaire"));
        }
    }
View Full Code Here

                Logger.info("Generating dummy article comments for member "+m);

                final int nbComments = Dummy.randomInt(2*averageCommentsPerMember);
                for (int i = 0; i < nbComments; i++) {
                    Article a = articles.get(Dummy.randomInt(articles.size()));
                    a.addComment(new ArticleComment(m, a, Dummy.randomText(3000)));
                    a.save();
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of models.ArticleComment

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.