Package org.rssowl.core.model.reference

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


    BookMarkReference bookmarkRef1 = new BookMarkReference(fDao.saveBookMark(bookmark1).getId());
    BookMarkReference bookmarkRef2 = new BookMarkReference(fDao.saveBookMark(bookmark2).getId());
    BookMarkReference bookmarkRef3 = new BookMarkReference(fDao.saveBookMark(bookmark3).getId());

    List<IBookMark> filledBookmarks = fAppLayer.loadBookMarks(feedRef.resolve());
    assertEquals(3, filledBookmarks.size());
    for (IBookMark mark : filledBookmarks) {
      if (bookmarkRef1.resolve().equals(mark))
        assertEquals(bookmark1.getName(), mark.getName());
      else if (bookmarkRef2.resolve().equals(mark))
View Full Code Here


        news = fFactory.createNews(null, feed, new Date());
        news.setTitle("News Title Case_2");
        news.setLink(new URI("http://www.news-case2.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.setTitle("News Title Case_2");
        news.setLink(new URI("http://www.news-case2.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

        /* b) Add the same News with updated Title */
        feed = createFeed(url);
        news = fFactory.createNews(null, feed, new Date());
        news.setTitle("News Title Case_2 Updated");
        news.setLink(new URI("http://www.news-case2.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());
      }

View Full Code Here

        news = fFactory.createNews(null, feed, new Date());
        news.setTitle("News Title Case_2 Updated");
        news.setLink(new URI("http://www.news-case2.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());
      }

      /* Case 3: News with Title and Guid */
      {
View Full Code Here

        news.setTitle("News Title Case_2 Updated");
        news.setLink(new URI("http://www.news-case2.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());
      }

      /* Case 3: News with Title and Guid */
      {
        /* Initial Add News */
 
View Full Code Here

        /* a) Add the same News */
        feed = createFeed(url);
        news = fFactory.createNews(null, feed, new Date());
        news.setTitle("News Title Case_3");
        news.setGuid(fFactory.createGuid(news, "News_Case_3_Guid"));
        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 = fFactory.createNews(null, feed, new Date());
        news.setTitle("News Title Case_3");
        news.setGuid(fFactory.createGuid(news, "News_Case_3_Guid"));
        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.setTitle("News Title Case_3");
        news.setGuid(fFactory.createGuid(news, "News_Case_3_Guid"));
        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

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.