Examples of StandardArticle


Examples of com.salas.bb.domain.StandardArticle

     * Tests inserting article in the array.
     */
    public void testInsertArticle()
    {
        IArticle[] emptyArticles = new IArticle[0];
        StandardArticle a1 = new StandardArticle("1");
        StandardArticle a2 = new StandardArticle("2");

        IArticle[] resultArticles;

        resultArticles = FeedDisplayModel.insertArticle(emptyArticles, a1, 0);
        assertEquals("Nothing has been added.", 1, resultArticles.length);
View Full Code Here

Examples of com.salas.bb.domain.StandardArticle

     *
     * @return new article.
     */
    protected IArticle appendArticle(DirectFeed feed, long deltaTime)
    {
        StandardArticle article = createArticle(deltaTime);

        feed.appendArticle(article);

        return article;
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardArticle

     * @return new article.
     */
    protected static StandardArticle createArticle(long deltaTime)
    {
        String txt = Long.toString(deltaTime);
        StandardArticle article = new StandardArticle(txt);
        article.setTitle(txt);
        article.setPublicationDate(new Date(System.currentTimeMillis() + deltaTime));
        return article;
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardArticle

    protected void setUp()
        throws Exception
    {
        super.setUp();

        StandardArticle article = new StandardArticle("a");
        article.setPublicationDate(new Date());

        display = new HTMLArticleDisplay(article, new SampleArticleDisplayConfig(),
            false, null, new CustomHTMLEditorKit());
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardArticle

    /**
     * Tests expanding and collapsing the views.
     */
    public void testExpandCollapse()
    {
        StandardArticle article1 = new StandardArticle("1");
        article1.setPublicationDate(new Date());
        StandardArticle article2 = new StandardArticle("2");
        article2.setPublicationDate(new Date());

        CustomHTMLEditorKit editorKit = new CustomHTMLEditorKit();
       
        HTMLArticleDisplay view1 = new HTMLArticleDisplay(article1,
            sampleArticleConfig, false, null, editorKit);
View Full Code Here

Examples of com.salas.bb.domain.StandardArticle

        SearchFeed feed = new SearchFeed();
        feed.setQuery(query);
        feed.setArticlesLimit(1);

        StandardArticle article = new StandardArticle("aaa");
        article.setID(1); // Make impression of that it was already saved
        feed.addArticleIfMatching(article);
        assertEquals("Article wasn't added.", 1, feed.getArticlesCount());

        // Checking
        HsqlPersistenceManager.clearFeedID(feed);
        assertFalse("Article ID shouldn't be reset because the article doesn't " +
            "belong to this feed.", -1 == article.getID());
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardArticle

    /** Testsig having articles, but not this week. */
    public void testIsEligible_NoTraffic()
    {
        // Add a sample article from month ago
        StandardArticle art = new StandardArticle("a");
        art.setPublicationDate(MONTH_AGO);
        feed.appendArticle(art);

        assertTrue(NoTrafficVisibleFeedsReport.isEligible(feed, WEEK_AGO));
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardArticle

    /** Testing having traffic. */
    public void testIsEligible_Traffic()
    {
        // Add a sample article from month ago
        StandardArticle art = new StandardArticle("a");
        art.setPublicationDate(DAY_AGO);
        feed.appendArticle(art);

        assertFalse(NoTrafficVisibleFeedsReport.isEligible(feed, WEEK_AGO));
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardArticle

        listener = new Mock(IResultsListModelListener.class);

        ResourceUtils.setBundlePath("Resource");

        // Create a feed with an article
        StandardArticle article1 = new StandardArticle("1");
        DirectFeed feed = new DirectFeed();
        feed.appendArticle(article1);

        // Create a model with an item
        model = new ResultsListModel();
View Full Code Here

Examples of com.salas.bb.domain.StandardArticle

        super.setUp();

        ResourceUtils.setBundlePath("Resource");

        // Create a feed with an article
        StandardArticle article1 = new StandardArticle("1");
        DirectFeed feed = new DirectFeed();
        feed.appendArticle(article1);

        // Create a model with an item
        model = new ResultsListModel();
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.