IFeed feed = new Feed(new URI("inmemory://rss_2_0.xml")); //$NON-NLS-1$
feed = DynamicDAO.save(feed);
FeedReference feedRef = new FeedReference(feed.getId());
IBookMark bookmark = createBookMark(feed);
InMemoryProtocolHandler.FEED = generateFeedWithDuplicateNews("News Title", null, null, null, "Description", null, null, null);
fController.reload(bookmark, null, new NullProgressMonitor());
assertEquals(1, feedRef.resolve().getNews().size());
DynamicDAO.delete(feedRef.resolve());
}
/* Duplicate News with: Title, Link */
{
IFeed feed = new Feed(new URI("inmemory://rss_2_0.xml")); //$NON-NLS-1$
feed = DynamicDAO.save(feed);
FeedReference feedRef = new FeedReference(feed.getId());
IBookMark bookmark = createBookMark(feed);
InMemoryProtocolHandler.FEED = generateFeedWithDuplicateNews("News Title", "http://www.link.com", null, null, "Description", null, null, null);
fController.reload(bookmark, null, new NullProgressMonitor());
assertEquals(1, feedRef.resolve().getNews().size());
DynamicDAO.delete(feedRef.resolve());
}
/* Duplicate News with: Title, Guid */
{
IFeed feed = new Feed(new URI("inmemory://rss_2_0.xml")); //$NON-NLS-1$
feed = DynamicDAO.save(feed);
FeedReference feedRef = new FeedReference(feed.getId());
IBookMark bookmark = createBookMark(feed);
InMemoryProtocolHandler.FEED = generateFeedWithDuplicateNews("News Title", null, "http://www.link.com", null, "Description", null, null, null);
fController.reload(bookmark, null, new NullProgressMonitor());
assertEquals(1, feedRef.resolve().getNews().size());
DynamicDAO.delete(feedRef.resolve());
}
/* Duplicate News with: Title, Link, Guid */
{
IFeed feed = new Feed(new URI("inmemory://rss_2_0.xml")); //$NON-NLS-1$
feed = DynamicDAO.save(feed);
FeedReference feedRef = new FeedReference(feed.getId());
IBookMark bookmark = createBookMark(feed);
InMemoryProtocolHandler.FEED = generateFeedWithDuplicateNews("News Title", "http://www.link.com", "http://www.guid.com", null, "Description", null, null, null);
fController.reload(bookmark, null, new NullProgressMonitor());
assertEquals(1, feedRef.resolve().getNews().size());
DynamicDAO.delete(feedRef.resolve());