this.method_name = name;
}
public void testParseDiveIntoMark() throws Exception {
File inpFile = new File(getDataDir(), "diveintomark.xml");
ChannelIF channel_mark = FeedParser.parse(new ChannelBuilder(), inpFile);
assertEquals("dive into mark", channel_mark.getTitle());
assertEquals(3, channel_mark.getItems().size());
// test generator
assertEquals("Movable Type", channel_mark.getGenerator());
//test publisher
assertEquals("Mark Pilgrim", channel_mark.getCreator());
//test Last pub date
// should be <modified>2004-05-13T17:16:00Z</modified>
Calendar updtDate = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
updtDate.set(Calendar.YEAR, 2004);
updtDate.set(Calendar.MONTH, Calendar.MAY);
updtDate.set(Calendar.DAY_OF_MONTH, 13);
updtDate.set(Calendar.HOUR_OF_DAY, 17);
updtDate.set(Calendar.MINUTE, 16);
updtDate.set(Calendar.SECOND, 00);
updtDate.set(Calendar.MILLISECOND, 0);
assertEquals(updtDate.getTime(), channel_mark.getPubDate());
//test build date
// test site url
assertNotNull(channel_mark.getSite());
assertEquals("http://diveintomark.org/",channel_mark.getSite().toExternalForm());
// test link for first item
java.util.Iterator itemsColl = channel_mark.getItems().iterator();
Item item = (Item) itemsColl.next();
assertEquals("http://diveintomark.org/archives/2004/05/12/copy-editor".trim(),item.getLink().toExternalForm());
assertEquals(ChannelFormat.ATOM_0_3, channel_mark.getFormat());
}