Package org.rssowl.core.model.reference

Examples of org.rssowl.core.model.reference.FeedReference.resolve()


        news.setGuid(fFactory.createGuid(news, "News_Case_8_Guid"));
        news.setPublishDate(new Date(time));
        IFeed mergedFeed = feedRef.resolve().merge(feed);
        feedRef = new FeedReference(fDao.saveFeed(mergedFeed).getId());
        assertEquals("Same News was added twice!", 1, feedRef.resolve().getNews().size());
        assertEquals("Existing News State changed unexpectedly!", INews.State.NEW, feedRef.resolve().getNews().get(0).getState());

        /* Mark News Read */
        news = feedRef.resolve().getNews().get(0);
        news.setState(INews.State.READ);
        fDao.saveNews(news);
View Full Code Here


        feedRef = new FeedReference(fDao.saveFeed(mergedFeed).getId());
        assertEquals("Same News was added twice!", 1, feedRef.resolve().getNews().size());
        assertEquals("Existing News State changed unexpectedly!", INews.State.NEW, feedRef.resolve().getNews().get(0).getState());

        /* Mark News Read */
        news = feedRef.resolve().getNews().get(0);
        news.setState(INews.State.READ);
        fDao.saveNews(news);

        /* b) Add the same News with updated Title */
        feed = createFeed(url);
View Full Code Here

        news = fFactory.createNews(null, feed, new Date());
        news.setTitle("News Title Case_8 Updated");
        news.setLink(new URI("http://www.news-case8.com/index.html"));
        news.setGuid(fFactory.createGuid(news, "News_Case_8_Guid"));
        news.setPublishDate(new Date(time));
        mergedFeed = feedRef.resolve().merge(feed);
        feedRef = new FeedReference(fDao.saveFeed(mergedFeed).getId());
        assertEquals("Same News was added twice!", 1, feedRef.resolve().getNews().size());
        assertEquals("Existing News State is not UPDATED!", INews.State.UPDATED, feedRef.resolve().getNews().get(0).getState());

        /* Mark News Read */
 
View Full Code Here

        news.setLink(new URI("http://www.news-case8.com/index.html"));
        news.setGuid(fFactory.createGuid(news, "News_Case_8_Guid"));
        news.setPublishDate(new Date(time));
        mergedFeed = feedRef.resolve().merge(feed);
        feedRef = new FeedReference(fDao.saveFeed(mergedFeed).getId());
        assertEquals("Same News was added twice!", 1, feedRef.resolve().getNews().size());
        assertEquals("Existing News State is not UPDATED!", INews.State.UPDATED, feedRef.resolve().getNews().get(0).getState());

        /* Mark News Read */
        news = feedRef.resolve().getNews().get(0);
        news.setState(INews.State.READ);
View Full Code Here

        news.setGuid(fFactory.createGuid(news, "News_Case_8_Guid"));
        news.setPublishDate(new Date(time));
        mergedFeed = feedRef.resolve().merge(feed);
        feedRef = new FeedReference(fDao.saveFeed(mergedFeed).getId());
        assertEquals("Same News was added twice!", 1, feedRef.resolve().getNews().size());
        assertEquals("Existing News State is not UPDATED!", INews.State.UPDATED, feedRef.resolve().getNews().get(0).getState());

        /* Mark News Read */
        news = feedRef.resolve().getNews().get(0);
        news.setState(INews.State.READ);
        fDao.saveNews(news);
View Full Code Here

        feedRef = new FeedReference(fDao.saveFeed(mergedFeed).getId());
        assertEquals("Same News was added twice!", 1, feedRef.resolve().getNews().size());
        assertEquals("Existing News State is not UPDATED!", INews.State.UPDATED, feedRef.resolve().getNews().get(0).getState());

        /* Mark News Read */
        news = feedRef.resolve().getNews().get(0);
        news.setState(INews.State.READ);
        fDao.saveNews(news);

        /* c) Add the same News with updated Guid */
        feed = createFeed(url);
View Full Code Here

        news = fFactory.createNews(null, feed, new Date());
        news.setTitle("News Title Case_8");
        news.setLink(new URI("http://www.news-case8.com/index.html"));
        news.setGuid(fFactory.createGuid(news, "News_Case_8_Guid_Updated"));
        news.setPublishDate(new Date(time));
        mergedFeed = feedRef.resolve().merge(feed);
        feedRef = new FeedReference(fDao.saveFeed(mergedFeed).getId());
        assertEquals("Expected two News in this Feed!", 2, feedRef.resolve().getNews().size());

        /* Mark News Read */
        news = feedRef.resolve().getNews().get(0);
View Full Code Here

        news.setLink(new URI("http://www.news-case8.com/index.html"));
        news.setGuid(fFactory.createGuid(news, "News_Case_8_Guid_Updated"));
        news.setPublishDate(new Date(time));
        mergedFeed = feedRef.resolve().merge(feed);
        feedRef = new FeedReference(fDao.saveFeed(mergedFeed).getId());
        assertEquals("Expected two News in this Feed!", 2, feedRef.resolve().getNews().size());

        /* Mark News Read */
        news = feedRef.resolve().getNews().get(0);
        news.setState(INews.State.READ);
        fDao.saveNews(news);
View Full Code Here

        mergedFeed = feedRef.resolve().merge(feed);
        feedRef = new FeedReference(fDao.saveFeed(mergedFeed).getId());
        assertEquals("Expected two News in this Feed!", 2, feedRef.resolve().getNews().size());

        /* Mark News Read */
        news = feedRef.resolve().getNews().get(0);
        news.setState(INews.State.READ);
        fDao.saveNews(news);

        /* d) Add the same News with updated Publish Date */
        feed = createFeed(url);
View Full Code Here

        news = fFactory.createNews(null, feed, new Date());
        news.setTitle("News Title Case_8");
        news.setLink(new URI("http://www.news-case8.com/index.html"));
        news.setGuid(fFactory.createGuid(news, "News_Case_8_Guid"));
        news.setPublishDate(new Date(System.currentTimeMillis() + 1000));
        mergedFeed = feedRef.resolve().merge(feed);
        feedRef = new FeedReference(fDao.saveFeed(mergedFeed).getId());
        assertEquals("Same News was added twice!", 2, feedRef.resolve().getNews().size());

        List<INews> newsRefs = feedRef.resolve().getNews();
        for (INews newsRef : newsRefs) {
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.