01: /*
02: * Created on Jun 24, 2004
03: *
04: */
05: package com.sun.syndication.unittest;
06:
07: import com.sun.syndication.io.impl.DateParser;
08: import com.sun.syndication.feed.synd.SyndEntry;
09:
10: import java.util.Date;
11: import java.util.List;
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 type) {
24: super (type);
25: }
26:
27: protected TestSyndFeedRSS093(String feedType, String feedFileName) {
28: super (feedType, feedFileName);
29: }
30:
31: protected void _testItem(int i) throws Exception {
32: super ._testItem(i);
33: List items = getCachedSyndFeed().getEntries();
34: SyndEntry entry = (SyndEntry) items.get(i);
35: Date d = DateParser.parseRFC822("Mon, 0" + (i + 1)
36: + " Jan 2001 00:00:00 GMT");
37: assertEquals(entry.getPublishedDate(), d);
38: _testDescriptionType(entry, i);
39: }
40:
41: protected void _testDescriptionType(SyndEntry entry, int i)
42: throws Exception {
43: assertProperty(entry.getDescription().getType(),
44: "channel.item[" + i + "].description^type");
45: }
46:
47: }
|