KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > syndication > unittest > TestSyndFeedRSS093


1 /*
2  * Created on Jun 24, 2004
3  *
4  */

5 package com.sun.syndication.unittest;
6
7 import com.sun.syndication.io.impl.DateParser;
8 import com.sun.syndication.feed.synd.SyndEntry;
9
10 import java.util.Date JavaDoc;
11 import java.util.List JavaDoc;
12
13 /**
14  * @author pat
15  *
16  */

17 public class TestSyndFeedRSS093 extends TestSyndFeedRSS092 {
18
19     public TestSyndFeedRSS093() {
20         super("rss_0.93");
21     }
22
23     protected TestSyndFeedRSS093(String JavaDoc type) {
24         super(type);
25     }
26
27     protected TestSyndFeedRSS093(String JavaDoc feedType,String JavaDoc feedFileName) {
28         super(feedType,feedFileName);
29     }
30
31     protected void _testItem(int i) throws Exception JavaDoc {
32         super._testItem(i);
33         List JavaDoc items = getCachedSyndFeed().getEntries();
34         SyndEntry entry = (SyndEntry) items.get(i);
35         Date JavaDoc d = DateParser.parseRFC822("Mon, 0"+(i+1)+" Jan 2001 00:00:00 GMT");
36         assertEquals(entry.getPublishedDate(),d);
37         _testDescriptionType(entry,i);
38     }
39
40     protected void _testDescriptionType(SyndEntry entry,int i) throws Exception JavaDoc {
41         assertProperty(entry.getDescription().getType(),"channel.item["+i+"].description^type");
42     }
43
44 }
45
Popular Tags