| | |
| | | entries.add(entry);
|
| | | }
|
| | | ByteArrayOutputStream os = new ByteArrayOutputStream();
|
| | | SyndicationUtils.toRSS("http://localhost", "Title", "Description", "Repository", entries,
|
| | | os);
|
| | | SyndicationUtils.toRSS("http://localhost", "", "Title", "Description", "Repository",
|
| | | entries, os);
|
| | | String feed = os.toString();
|
| | | os.close();
|
| | | assertTrue(feed.indexOf("<title>Title</title>") > -1);
|
| | |
| | | assertTrue(feed.size() > 0);
|
| | | assertEquals(5, feed.size());
|
| | | }
|
| | |
|
| | | public void testSearchFeedRead() throws Exception {
|
| | | List<SyndicatedEntryModel> feed = SyndicationUtils.readSearchFeed("https://localhost:8443",
|
| | | "ticgit.git", null, "documentation", null, 5, "admin", "admin".toCharArray());
|
| | | assertTrue(feed != null);
|
| | | assertTrue(feed.size() > 0);
|
| | | assertEquals(2, feed.size());
|
| | | }
|
| | | } |