1 package org.tigris.scarab.feeds; 2 47 import org.apache.torque.om.NumberKey; 48 import org.tigris.scarab.om.Query; 49 import org.tigris.scarab.om.QueryManager; 50 import org.tigris.scarab.om.ScarabUser; 51 import org.tigris.scarab.om.ScarabUserManager; 52 import org.tigris.scarab.test.BaseScarabTestCase; 53 54 import com.sun.syndication.feed.synd.SyndFeed; 55 import com.sun.syndication.io.SyndFeedOutput; 56 57 58 62 public class QueryFeedTest extends BaseScarabTestCase { 63 64 public void testCreatingFeed() throws Exception { 65 Query query = QueryManager.getInstance(new Long (280)); 66 ScarabUser user1 = ScarabUserManager.getInstance(new NumberKey(1), false); 67 assertNotNull(query); 68 Feed feed = new QueryFeed(query,user1,null,null); 69 SyndFeed syndFeed = feed.getFeed(); 70 syndFeed.setFeedType("rss_2.0"); 71 SyndFeedOutput out = new SyndFeedOutput(); 72 String stringOutput = out.outputString(syndFeed); 73 System.out.println(stringOutput); 74 } 75 76 } 77 | Popular Tags |