use of com.rometools.rome.io.XmlReader in project rssriver by dadoonet.
the class RssToJsonTest method buildEntry.
private SyndEntryImpl buildEntry() throws FeedException, IOException {
SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(new XmlReader(getClass().getResource("/reuters/rss.xml")));
return (SyndEntryImpl) feed.getEntries().get(0);
}
use of com.rometools.rome.io.XmlReader in project rssriver by dadoonet.
the class RssToJsonTest method shouldHaveRawContent.
@Test
public void shouldHaveRawContent() throws Exception {
SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(new XmlReader(getClass().getResource("/dcrainmaker/rss.xml")));
assertThat(feed.getEntries().size(), greaterThan(0));
for (Object o : feed.getEntries()) {
SyndEntryImpl message = (SyndEntryImpl) o;
XContentBuilder xcb = toJson(message, null, null, true);
assertThat(xcb, notNullValue());
assertThat(xcb.string(), containsString("<p>"));
logger.info(xcb.string());
}
}
Aggregations