1 package com.sun.syndication.unittest; 2 3 import com.sun.syndication.feed.synd.SyndEntry; 4 import com.sun.syndication.feed.synd.SyndFeed; 5 import com.sun.syndication.io.impl.Atom10Parser; 6 7 import java.util.ArrayList; 8 import java.util.Iterator; 9 import java.util.List; 10 11 public class TestSyndFeedAtom10Ruby extends FeedTest { 12 13 protected void setUp() throws Exception { 14 super.setUp(); 15 Atom10Parser.setResolveURIs(true); 16 } 17 18 protected void tearDown() throws Exception { 19 Atom10Parser.setResolveURIs(false); 20 super.tearDown(); 21 } 22 23 public TestSyndFeedAtom10Ruby() { 24 super("atom_1.0_ruby.xml"); 25 } 26 27 public void testFeedURI() throws Exception { 28 SyndFeed feed = getSyndFeed(); 29 assertEquals("http://www.example.com/blog", feed.getUri()); 30 } 31 public void testEntry1URI() throws Exception { 32 SyndFeed feed = getSyndFeed(); 33 SyndEntry entry = (SyndEntry)feed.getEntries().get(0); 34 assertEquals("http://www.example.com/blog/bloggy-blog", entry.getLink()); 35 } 36 public void testEntry2URI() throws Exception { 37 SyndFeed feed = getSyndFeed(); 38 SyndEntry entry = (SyndEntry)feed.getEntries().get(1); 39 assertEquals("http://www.example.com/frog/froggy-frog", entry.getLink()); 40 } 41 }