Package org.rssowl.core.model.reference

Examples of org.rssowl.core.model.reference.FeedReference


   * @throws Exception
   */
  @Test
  public void testLoadBookMarksActivation() throws Exception {
    IFeed feed = fFactory.createFeed(null, new URL("http://www.myfeed.com"));
    FeedReference feedRef = new FeedReference(fDao.saveFeed(feed).getId());
    long feedId = feedRef.getId();
    IFolder root1 = fFactory.createFolder(null, null, "Root 1");
    final String folderName = root1.getName();
    fFactory.createBookMark(null, root1, feed.getLink(), feedRef, "Bookmark 1");
    feedRef = null;
    feed = null;
View Full Code Here


   * @throws Exception
   */
  @Test
  public void testLoadAllBookMarks() throws Exception {
    IFeed feed = fFactory.createFeed(null, new URL("http://www.myfeed.com"));
    FeedReference feedRef = new FeedReference(fDao.saveFeed(feed).getId());

    List<IBookMark> emptyBookmarks = fAppLayer.loadAllBookMarks(false);
    emptyBookmarks = fAppLayer.loadAllBookMarks(true);
    assertEquals(0, emptyBookmarks.size());

View Full Code Here

   * @throws Exception
   */
  @Test
  public void testLoadAllBookMarksActivation() throws Exception {
    IFeed feed = fFactory.createFeed(null, new URL("http://www.myfeed.com"));
    FeedReference feedRef = new FeedReference(fDao.saveFeed(feed).getId());

    IFolder root1 = fFactory.createFolder(null, null, "Root 1");
    final String folderName = root1.getName();
    fFactory.createBookMark(null, root1, feed.getLink(), feedRef, "Bookmark 1");
    feedRef = null;
View Full Code Here

    IFeed savedFeed = fAppLayer.loadFeed(feed.getLink());
    if (savedFeed == null)
      savedFeed = fModelDAO.saveFeed(feed);
   
    IBookMark bookMark = fTypesFactory.createBookMark(null, folder, savedFeed.getLink(),
        new FeedReference(savedFeed.getId()), "Default bookmark");
    bookMark.setLastVisitDate(createDate());
    bookMark.setPopularity(50);
    bookMark.setErrorLoading(false);
    return bookMark;
  }
View Full Code Here

      news.setState(State.NEW);
      fModelDAO.saveNews(news);
     
      NewsModel.getDefault().removeNewsListener(newsListener);
      fModelDAO.deleteNews(new NewsReference(news.getId()));
      fModelDAO.deleteFeed(new FeedReference(feed.getId()));
    } finally {
      if (newsListener != null) {
        NewsModel.getDefault().removeNewsListener(newsListener);
      }
    }
View Full Code Here

    long feedId = feed.getId();
    feed = null;
    System.gc();
    IFeed savedFeed = fModelDAO.loadFeed(feedId);
    assertEquals(1, savedFeed.getNews().size());
    fModelDAO.deleteFeed(new FeedReference(feedId));
  }
View Full Code Here

    IConditionalGet conditionalGet = fTypesFactory.createConditionalGet("2005/11/04",
        feed.getLink(), null);

    fModelDAO.saveConditionalGet(conditionalGet);
   
    fModelDAO.deleteFeed(new FeedReference(feed.getId()));
    assertNull(fModelDAO.loadFeed(feed.getId()));
    assertNull(fModelDAO.loadConditionalGet(feed.getLink()));
  }
View Full Code Here

  @Test
  public void testAddAndDeleteFeed() {
    try {
      IFeed feed = createFeed();
      feed = fModelDAO.saveFeed(feed);
      fModelDAO.deleteFeed(new FeedReference(feed.getId()));
      assertNull(fModelDAO.loadFeed(feed.getId()));
    } catch (PersistenceException e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

      };
      NewsModel.getDefault().addFeedListener(feedListener);
      fModelDAO.saveFeed(initialFeed);
      assertTrue(feedAddedCalled[0]);
      assertTrue(feedUpdatedCalled[0]);
      fModelDAO.deleteFeed(new FeedReference(updatedFeed[0].getId()));
    } catch (PersistenceException e) {
      fail(e.getMessage());
    } finally {
      if (feedListener != null) {
        NewsModel.getDefault().removeFeedListener(feedListener);
View Full Code Here

        }
       
      };
      NewsModel.getDefault().addFeedListener(feedListener);
      fModelDAO.saveFeed(initialFeed);
      fModelDAO.deleteFeed(new FeedReference(updatedFeed[0].getId()));
    } catch (PersistenceException e) {
      fail(e.getMessage());
    } finally {
      if (feedListener != null) {
        NewsModel.getDefault().removeFeedListener(feedListener);
View Full Code Here

TOP

Related Classes of org.rssowl.core.model.reference.FeedReference

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.