01: package com.sun.syndication.unittest;
02:
03: import com.sun.syndication.feed.synd.SyndEntry;
04: import com.sun.syndication.feed.synd.SyndFeed;
05:
06: import java.util.ArrayList;
07: import java.util.Iterator;
08: import java.util.List;
09:
10: public class TestSyndFeedAtom10Bray extends FeedTest {
11: public TestSyndFeedAtom10Bray() {
12: super ("atom_1.0_bray.xml");
13: }
14:
15: public void testFeedURI() throws Exception {
16: SyndFeed feed = getSyndFeed();
17: assertEquals("Bad URL: " + feed.getUri(),
18: "http://www.example.com/blog", feed.getUri());
19: }
20:
21: public void testEntry1URI() throws Exception {
22: SyndFeed feed = getSyndFeed();
23: SyndEntry entry = (SyndEntry) feed.getEntries().get(0);
24: assertEquals("Bad URL: " + entry.getLink(),
25: "http://www.example.com/blog/2006-11-05/entry1", entry
26: .getLink());
27: }
28:
29: public void testEntry2URI() throws Exception {
30: SyndFeed feed = getSyndFeed();
31: SyndEntry entry = (SyndEntry) feed.getEntries().get(1);
32: assertEquals("Bad URL: " + entry.getLink(),
33: "http://www.example.com/blog/2006-11-02/entry2", entry
34: .getLink());
35: }
36: }
|