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 TestSyndFeedAtom10b extends FeedTest { 12 13 14 protected void setUp() throws Exception { 15 super.setUp(); 16 Atom10Parser.setResolveURIs(true); 17 } 18 19 protected void tearDown() throws Exception { 20 Atom10Parser.setResolveURIs(false); 21 super.tearDown(); 22 } 23 24 public TestSyndFeedAtom10b() { 25 super("atom_1.0_b.xml"); 26 } 27 28 public void testXmlBaseConformance() throws Exception { 29 List errors = new ArrayList(); 30 SyndFeed feed = getSyndFeed(); 31 List entries = feed.getEntries(); 32 for (int index = 0; index < entries.size(); index++) { 33 SyndEntry entry = (SyndEntry) entries.get(index); 34 assertEquals( 35 "Incorrect URI: " + entry.getLink() + " in entry [" + entry.getTitle() + "]", 36 "http://example.org/tests/base/result.html", entry.getLink()); 37 } 38 } 39 }