public void testBuildManagingEditor() {
try {
rss1 = rssDoc.readRSSToBean(expectedRSS1);
assertNotNull(rss1);
assertNotNull(rss1.getChannel());
ManagingEditor me = rss1.getChannel().getManagingEditor();
assertNotNull(me);
assertNotNull(me.getManagingEditor());
assertEquals(me.getManagingEditor(), "Bill Brown");
} catch (Exception e) {
fail("should not fail here.");
}
try {
rssDoc.buildManagingEditor(null);
fail("should not get here.");
} catch (RSSpectException r) {
assertEquals(r.getMessage(), "managingEditor SHOULD NOT be blank.");
}
try {
rssDoc.buildManagingEditor("");
fail("should not get here.");
} catch (RSSpectException r) {
assertEquals(r.getMessage(), "managingEditor SHOULD NOT be blank.");
}
try {
ManagingEditor managingEditor = rssDoc.buildManagingEditor("you");
assertNotNull(managingEditor);
assertEquals(managingEditor.getManagingEditor(), "you");
} catch (RSSpectException r) {
fail("should not get here.");
}
}