Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniosanct committed Oct 21, 2022
1 parent be11cc2 commit 6fed94b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ protected SyndEntry createSyndEntry(final Item item, final boolean preserveWireI
comments.setRel("comments");
comments.setHref(item.getComments());
comments.setType("text/html");
syndEntry.getLinks().add(comments);
}

return syndEntry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ public void testImageDescription() throws Exception {
assertProperty(this.getCachedSyndFeed().getImage().getDescription(), "channel.image.description");
}

public void testItem() throws Exception {
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
for (int i = 0; i < items.size(); i++) {
testItem(i);
}
}

protected void testItem(final int i) throws Exception {
final List<SyndEntry> items = this.getCachedSyndFeed().getEntries();
final SyndEntry entry = items.get(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ protected void testItem(final int i) throws Exception {
final SyndEntry entry = items.get(i);

assertProperty(entry.getAuthor(), "channel.item[" + i + "].author");
testUri(entry, i);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ protected void testItem(final int i) throws Exception {
}

protected void testComments(final SyndEntry entry, final int i) throws Exception {
assertProperty(entry.findRelatedLink("comments").getHref(), "rss_0.94.channel.item[" + i + "].comments");
final String property = entry.findRelatedLink("comments").getHref();
assertProperty(property, "channel.item[" + i + "].comments");
}

}

0 comments on commit 6fed94b

Please sign in to comment.