@Test public void testFeedImpl() { try { Content title = new PlainTextContent("Test Feed"); Content description = new HtmlContent("generated by <b>unit test</b>", Mode.Escaped); FeedImpl feed = new FeedImpl(Type.RSS, "http: "http: feed.addAuthor(new PersonImpl("Test User", "testuser@example.com", "http: feed.addContributor(new PersonImpl("test university")); FeedEntry entry = new FeedEntryImpl(feed, "test entry", new LinkImpl( "http: "http: entry.addEnclosure(new EnclosureImpl("http: feed.addEntry(entry); ITunesFeedExtension itunesmodule = new ITunesFeedExtension(); itunesmodule.addKeyword("test"); List<String> categories = new LinkedList<String>(); categories.add("Higher Education"); itunesmodule.setCategories(categories); feed.addModule(itunesmodule); DublinCoreExtension dcModule = new DublinCoreExtension(); feed.addModule(dcModule); Assert.assertEquals(feed.getAuthors().get(0).getName(), "Test User"); Assert.assertEquals(feed.getAuthors().get(0).getEmail(), "testuser@example.com"); Assert.assertEquals(feed.getContributors().get(0).getName(), "test university"); Assert.assertEquals(feed.getTitle().getValue(), "Test Feed"); Assert.assertEquals(feed.getDescription().getType(), "text/html"); Assert.assertEquals(feed.getType(), Type.RSS); Assert.assertEquals(feed.getLink(), "http: } catch (Exception e) { Assert.fail(); } }
FeedImpl(Type type, String uri, Content title, Content description, String link) { this.type = type; this.uri = uri; this.title = title; this.description = description; this.link = link; }
FeedImpl implements Feed { FeedImpl(Type type, String uri, Content title, Content description, String link) { this.type = type; this.uri = uri; this.title = title; this.description = description; this.link = link; } }
FeedImpl implements Feed { FeedImpl(Type type, String uri, Content title, Content description, String link) { this.type = type; this.uri = uri; this.title = title; this.description = description; this.link = link; } FeedImpl(Type type, String uri, Content title, Content description, String link); }
FeedImpl implements Feed { FeedImpl(Type type, String uri, Content title, Content description, String link) { this.type = type; this.uri = uri; this.title = title; this.description = description; this.link = link; } FeedImpl(Type type, String uri, Content title, Content description, String link); Type getType(); String getLink(); void setLink(String link); void addAuthor(Person author); void addContributor(Person contributor); void addEntry(FeedEntry entry); void addLink(Link link); void addModule(FeedExtension module); List<Person> getAuthors(); List<Category> getCategories(); List<Person> getContributors(); String getCopyright(); Content getDescription(); String getEncoding(); List<FeedEntry> getEntries(); Image getImage(); String getLanguage(); List<Link> getLinks(); FeedExtension getModule(String uri); List<FeedExtension> getModules(); Date getPublishedDate(); Date getUpdatedDate(); Content getTitle(); String getUri(); void setAuthors(List<Person> authors); void setCategories(List<Category> categories); void setContributors(List<Person> contributors); void setCopyright(String copyright); void setDescription(String description); void setDescription(Content description); void setEncoding(String encoding); void setEntries(List<FeedEntry> entries); void setImage(Image image); void setLanguage(String language); void setLinks(List<Link> links); void setModules(List<FeedExtension> modules); void setPublishedDate(Date publishedDate); void setUpdatedDate(Date updatedDate); void setTitle(String title); void setTitle(Content title); void setUri(String uri); }
FeedImpl implements Feed { FeedImpl(Type type, String uri, Content title, Content description, String link) { this.type = type; this.uri = uri; this.title = title; this.description = description; this.link = link; } FeedImpl(Type type, String uri, Content title, Content description, String link); Type getType(); String getLink(); void setLink(String link); void addAuthor(Person author); void addContributor(Person contributor); void addEntry(FeedEntry entry); void addLink(Link link); void addModule(FeedExtension module); List<Person> getAuthors(); List<Category> getCategories(); List<Person> getContributors(); String getCopyright(); Content getDescription(); String getEncoding(); List<FeedEntry> getEntries(); Image getImage(); String getLanguage(); List<Link> getLinks(); FeedExtension getModule(String uri); List<FeedExtension> getModules(); Date getPublishedDate(); Date getUpdatedDate(); Content getTitle(); String getUri(); void setAuthors(List<Person> authors); void setCategories(List<Category> categories); void setContributors(List<Person> contributors); void setCopyright(String copyright); void setDescription(String description); void setDescription(Content description); void setEncoding(String encoding); void setEntries(List<FeedEntry> entries); void setImage(Image image); void setLanguage(String language); void setLinks(List<Link> links); void setModules(List<FeedExtension> modules); void setPublishedDate(Date publishedDate); void setUpdatedDate(Date updatedDate); void setTitle(String title); void setTitle(Content title); void setUri(String uri);  }