assertNotNull(rss1.getChannel());
List<Item> items = rss1.getChannel().getItems();
assertNotNull(items);
for (Item item : items) {
Comments comments = item.getComments();
assertNotNull(comments);
assertNotNull(comments.getComments());
}
} catch (Exception e) {
e.printStackTrace();
fail("should be working. " + e.getLocalizedMessage());
}
try {
rssDoc.buildComments(null);
fail("should not get here.");
} catch (RSSpectException r) {
assertEquals(r.getMessage(), "comments SHOULD NOT be blank.");
}
try {
rssDoc.buildComments("");
fail("should not get here.");
} catch (RSSpectException r) {
assertEquals(r.getMessage(), "comments SHOULD NOT be blank.");
}
try {
Comments comments = rssDoc.buildComments("these are comments");
assertNotNull(comments);
assertEquals(comments.getComments(), "these are comments");
} catch (RSSpectException r) {
fail("should not get here.");
}
}