1 26 27 29 package de.nava.informa.parsers; 30 31 import java.io.File ; 32 import java.io.IOException ; 33 34 import de.nava.informa.core.ChannelFormat; 35 import de.nava.informa.core.ChannelIF; 36 import de.nava.informa.core.ParseException; 37 import de.nava.informa.impl.basic.ChannelBuilder; 38 import de.nava.informa.utils.InformaTestCase; 39 40 public class TestRSS_0_92_Parser extends InformaTestCase { 41 42 public TestRSS_0_92_Parser(String name) 43 throws IOException , ParseException { 44 45 super("TestRSS_0_92_Parser", name); 46 this.method_name = name; 47 } 48 49 public void testParseW3CSynd() throws Exception { 50 File inpFile = new File (getDataDir(), "juancolecom.rss"); 51 ChannelIF channel_juan = FeedParser.parse(new ChannelBuilder(), inpFile); 52 assertEquals("Juan Cole * Informed Comment *", channel_juan.getTitle()); 53 assertEquals(25, channel_juan.getItems().size()); 54 assertEquals(ChannelFormat.RSS_0_91, channel_juan.getFormat()); 56 } 57 58 } 59 | Popular Tags |