Package org.rssowl.core.model.reference

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


        news.setTitle("News Title Case_6");
        news.setGuid(fFactory.createGuid(news, "News_Case_6_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

        feed = createFeed(url);
        news = fFactory.createNews(null, feed, new Date());
        news.setTitle("News Title Case_6");
        news.setGuid(fFactory.createGuid(news, "News_Case_6_Guid"));
        news.setPublishDate(new Date(time + 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

        news.setTitle("News Title Case_6");
        news.setGuid(fFactory.createGuid(news, "News_Case_6_Guid"));
        news.setPublishDate(new Date(time + 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) {
          if ("News_Case_6_Guid".equals(newsRef.getGuid().getValue()))
            assertEquals("Existing News State is not UPDATED!", INews.State.UPDATED, newsRef.getState());
View Full Code Here

        news.setPublishDate(new Date(time + 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) {
          if ("News_Case_6_Guid".equals(newsRef.getGuid().getValue()))
            assertEquals("Existing News State is not UPDATED!", INews.State.UPDATED, newsRef.getState());
        }
      }
View Full Code Here

        feed = createFeed(url);
        news = fFactory.createNews(null, feed, new Date());
        news.setTitle("News Title Case_7");
        news.setGuid(fFactory.createGuid(news, "News_Case_7_Guid"));
        news.setLink(new URI("http://www.news-case7.com/index.html"));
        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 */
 
View Full Code Here

        news.setTitle("News Title Case_7");
        news.setGuid(fFactory.createGuid(news, "News_Case_7_Guid"));
        news.setLink(new URI("http://www.news-case7.com/index.html"));
        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);
View Full Code Here

        news.setGuid(fFactory.createGuid(news, "News_Case_7_Guid"));
        news.setLink(new URI("http://www.news-case7.com/index.html"));
        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

        feed = createFeed(url);
        news = fFactory.createNews(null, feed, new Date());
        news.setTitle("News Title Case_7 Updated");
        news.setGuid(fFactory.createGuid(news, "News_Case_7_Guid"));
        news.setLink(new URI("http://www.news-case7.com/index.html"));
        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

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.