use of de.test.antennapod.util.syndication.feedgenerator.RSS2Generator in project AntennaPod by AntennaPod.
the class FeedHandlerTest method testRSS2Basic.
public void testRSS2Basic() throws IOException, UnsupportedFeedtypeException, SAXException, ParserConfigurationException {
Feed f1 = createTestFeed(10, false, true, true);
Feed f2 = runFeedTest(f1, new RSS2Generator(), "UTF-8", RSS2Generator.FEATURE_WRITE_GUID);
feedValid(f1, f2, Feed.TYPE_RSS2);
}
use of de.test.antennapod.util.syndication.feedgenerator.RSS2Generator in project AntennaPod by AntennaPod.
the class UITestUtils method hostFeed.
private String hostFeed(Feed feed) throws IOException {
File feedFile = new File(hostedFeedDir, feed.getTitle());
FileOutputStream out = new FileOutputStream(feedFile);
RSS2Generator generator = new RSS2Generator();
generator.writeFeed(feed, out, "UTF-8", 0);
out.close();
int id = server.serveFile(feedFile);
Assert.assertTrue(id != -1);
return String.format("%s/files/%d", HTTPBin.BASE_URL, id);
}
Aggregations