commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad Neuberg <b...@columbia.edu>
Subject [feedparser] Patch to Improve Unit Tests
Date Thu, 21 Oct 2004 16:44:17 GMT
The following patch improves the feed parser's unit tests.  It does the 
following:
* Gets the tests to run cross-platform
* Modifies the tests to use the new BlogService system, which I will post 
as a patch after this email.

The patch:

The following patch updates the unit tests

Index src/java/org/apache/commons/feedparser/test/TestFeedFilter.java
===================================================================
RCS file 
/home/cvspublic/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/test/TestFeedFilter.java,v
retrieving revision 1.4
diff -u -B -r1.4 TestFeedFilter.java
--- src/java/org/apache/commons/feedparser/test/TestFeedFilter.java     14 
Sep 2004 013204 -0000        1.4
+++ src/java/org/apache/commons/feedparser/test/TestFeedFilter.java     21 
Oct 2004 011306 -0000
@@ -1,12 +1,12 @@
  /*
   * Copyright 1999,2004 The Apache Software Foundation.
- *
+ *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
- *
+ *
   *      http//www.apache.org/licenses/LICENSE-2.0
- *
+ *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -44,12 +44,19 @@
   * @version $Id TestFeedFilter.java,v 1.4 2004/09/14 013204 burton Exp $
   */
  public class TestFeedFilter extends TestCase {
-
-    public static int current = 0;
+    protected String feedparserHome;

+    public static int current = 0;
+
      public TestFeedFilter( String name ) throws Exception {
          super( name );
-
+
+        feedparserHome = System.getProperty("feedparser.home", ".");
+        // these come in as forward slashes, even on Windows, because of Ant,
+        // so it is safe to check them as / rather than File.separator
+        // Brad Neuberg
+        if (feedparserHome.endsWith("/") == false)
+            feedparserHome = feedparserHome + "/";
      }

      private void doTest( String resource ) throws Exception {
@@ -59,14 +66,14 @@
          URL url = new URL( resource );

          FileOutputStream fos = new FileOutputStream( 
"/tmp/test-feed-filter-" + current + ".html" );
-
+
          PrintStream out = new PrintStream( fos, true, "UTF-8" );

          out.println( "<META HTTP-EQUIV=\"Content-Type\" 
CONTENT=\"text/html; charset=UTF-8\"> " );
          out.println( "<pre>" );

          DebugFeedParserListener listener = new DebugFeedParserListener( 
out );
-
+
          FeedParser.parse( listener, url.openStream(), resource );

          out.println( "</pre>" );
@@ -74,36 +81,37 @@
          ++current;

      }
-
+
      public void test1() throws Exception {
+        String path = "file" + feedparserHome;

-        doTest( "filetests/feeds/rss-1.0-EUC-JP.rdf" );
+        doTest( path + "tests/feeds/rss-1.0-EUC-JP.rdf" );

-        doTest( "filetests/filter/nbsp-1.xml" );
+        doTest( path + "tests/filter/nbsp-1.xml" );

-        doTest( "filetests/filter/entity-atom-1.xml" );
+        doTest( path + "tests/filter/entity-atom-1.xml" );

-        doTest( "filetests/filter/prolog-atom-1.xml" );
-        doTest( "filetests/filter/prolog-atom-2.xml" );
-        doTest( "filetests/filter/prolog-opml-1.xml" );
+        doTest( path + "tests/filter/prolog-atom-1.xml" );
+        doTest( path + "tests/filter/prolog-atom-2.xml" );
+        doTest( path + "tests/filter/prolog-opml-1.xml" );

-        doTest( "filetests/filter/lisa.opml" );
+        doTest( path + "tests/filter/lisa.opml" );

-        doTest( "filetests/feeds/utf16.rss1" );
-        doTest( "filetests/feeds/utf16.rss2" );
-        doTest( "filetests/feeds/i18n.atom" );
-        doTest( "filetests/feeds/utf16.atom" );
+        doTest( path + "tests/feeds/utf16.rss1" );
+        doTest( path + "tests/feeds/utf16.rss2" );
+        doTest( path + "tests/feeds/i18n.atom" );
+        doTest( path + "tests/feeds/utf16.atom" );

-        doTest( "filetests/feeds/atom-1.xml" );
-        doTest( "filetests/feeds/rss-1.0-EUC-JP.rdf" );
-        doTest( "filetests/feeds/rss-1.0-international-1.rdf" );
+        doTest( path + "tests/feeds/atom-1.xml" );
+        doTest( path + "tests/feeds/rss-1.0-EUC-JP.rdf" );
+        doTest( path + "tests/feeds/rss-1.0-international-1.rdf" );

      }

      public static void main( String[] args ) throws Exception {

          TestFeedFilter test = new TestFeedFilter( null );
-
+
          //test.testGetWeblogLinkForResource();
          test.test1();

Index src/java/org/apache/commons/feedparser/test/TestFeedLocator.java
===================================================================
RCS file 
/home/cvspublic/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/test/TestFeedLocator.java,v
retrieving revision 1.5
diff -u -B -r1.5 TestFeedLocator.java
--- src/java/org/apache/commons/feedparser/test/TestFeedLocator.java    31 
Aug 2004 210032 -0000        1.5
+++ src/java/org/apache/commons/feedparser/test/TestFeedLocator.java    21 
Oct 2004 011306 -0000
@@ -44,10 +44,17 @@
   * @version $Id TestFeedLocator.java,v 1.5 2004/08/31 210032 burton Exp $
   */
  public class TestFeedLocator extends TestCase {
-
+    protected String feedparserHome;
+
      public TestFeedLocator( String name ) throws Exception {
          super( name );
-
+
+        feedparserHome = System.getProperty("feedparser.home", ".");
+        // these come in as forward slashes, even on Windows, because of Ant,
+        // so it is safe to check them as / rather than File.separator
+        // Brad Neuberg
+        if (feedparserHome.endsWith("/") == false)
+            feedparserHome = feedparserHome + "/";
      }

      private void doTest( String resource ) throws Exception {
@@ -58,27 +65,24 @@

          Iterator it = l.iterator();

-        if ( it.hasNext() == false ) {
-            throw new Exception( "NO LINKS FOUND" );
-        }
-
+        // See if no links were found
+        assertTrue("No links were found for " + resource, it.hasNext());
          System.out.println( "Atom " + l.getAdAtomFeed() );
          System.out.println( "RSS " + l.getAdRSSFeed() );

      }

      public void test1() throws Exception {
+        String path = "file" + feedparserHome;

-        doTest( "filetests/locate/locate10.html" );
-
-        doTest( "filetests/locate/locate1.html" );
-        doTest( "filetests/locate/locate2.html" );
-        doTest( "filetests/locate/locate3.html" );
-        doTest( "filetests/locate/locate4.html" );
-        doTest( "filetests/locate/locate5.html" );
-        doTest( "filetests/locate/locate6.html" );
-        doTest( "filetests/locate/locate7.html" );
-
+        doTest( path + "tests/locate/locate1.html" );
+        doTest( path + "tests/locate/locate2.html" );
+        doTest( path + "tests/locate/locate3.html" );
+        doTest( path + "tests/locate/locate4.html" );
+        doTest( path + "tests/locate/locate5.html" );
+        doTest( path + "tests/locate/locate6.html" );
+        doTest( path + "tests/locate/locate7.html" );
+        doTest( path + "tests/locate/locate10.html" );
      }

      public static void main( String[] args ) throws Exception {
Index src/java/org/apache/commons/feedparser/test/TestProbeLocator.java
===================================================================
RCS file 
/home/cvspublic/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/test/TestProbeLocator.java,v
retrieving revision 1.5
diff -u -B -r1.5 TestProbeLocator.java
--- src/java/org/apache/commons/feedparser/test/TestProbeLocator.java   23 
Sep 2004 015126 -0000        1.5
+++ src/java/org/apache/commons/feedparser/test/TestProbeLocator.java   21 
Oct 2004 011306 -0000
@@ -20,14 +20,14 @@

  import org.apache.commons.feedparser.*;
  import org.apache.commons.feedparser.locate.*;
+import org.apache.commons.feedparser.locate.blogservice.*;

  import java.net.*;
  import java.io.*;
-import org.peerfear.newsmonster.network.*;

  /**
   *
- * @author <a href="mailtoburton@peerfear.org">Kevin A. Burton</a>
+ * @author <a href="mailtobkn3@columbia.edu">Brad Neuberg</a>
   * @version $Id TestProbeLocator.java,v 1.5 2004/09/23 015126 burton Exp $
   */
  public class TestProbeLocator extends TestCase {
@@ -64,26 +64,26 @@

      public void testBlogger() throws Exception {
          System.out.println("\nTesting Blogger...");
-        testSite("http//edpro.blogspot.com/", BlogService.BLOGGER, 1,
+        testSite("http//edpro.blogspot.com/", new Blogger(), 1,
                   new String[] { FeedReference.ATOM_MEDIA_TYPE },
                   new String[] { "http//edpro.blogspot.com/atom.xml" },
                   HAS_ATOM_FEED, "http//edpro.blogspot.com/atom.xml",
                   NO_RSS_FEED, null);

-        testSite("http//carolinascl.blogspot.com/", BlogService.BLOGGER, 1,
+        testSite("http//carolinascl.blogspot.com/", new Blogger(), 1,
                   new String[] { FeedReference.ATOM_MEDIA_TYPE },
                   new String[] { "http//carolinascl.blogspot.com/atom.xml" },
                   HAS_ATOM_FEED, "http//carolinascl.blogspot.com/atom.xml",
                   NO_RSS_FEED, null);

-        testSite("http//azizindia.blogspot.com/", BlogService.BLOGGER, 1,
+        testSite("http//azizindia.blogspot.com/", new Blogger(), 1,
                   new String[] { FeedReference.ATOM_MEDIA_TYPE },
                   new String[] { "http//azizindia.blogspot.com/atom.xml" },
                   HAS_ATOM_FEED, "http//azizindia.blogspot.com/atom.xml",
                   NO_RSS_FEED, null);

          // This site has no blogs
-        testSite("http//davebarry.blogspot.com/", BlogService.BLOGGER, 0,
+        testSite("http//davebarry.blogspot.com/", new Blogger(), 0,
                   new String[] { },
                   new String[] { },
                   NO_ATOM_FEED, null,
@@ -93,7 +93,7 @@
      public void testLiveJournal() throws Exception {
         System.out.println("\nTesting LiveJournal...");
         testSite("http//www.livejournal.com/community/indiexiankids/",
-                BlogService.LIVEJOURNAL, 2,
+                new LiveJournal(), 2,
                  new String[] {
                                 FeedReference.ATOM_MEDIA_TYPE,
                                 FeedReference.RSS_MEDIA_TYPE
@@ -106,7 +106,7 @@
                  HAS_RSS_FEED, 
"http//www.livejournal.com/community/indiexiankids/data/rss");

         testSite("http//www.livejournal.com/community/ajoyforever/",
-                BlogService.LIVEJOURNAL, 2,
+                new LiveJournal(), 2,
                  new String[] {
                                 FeedReference.ATOM_MEDIA_TYPE,
                                 FeedReference.RSS_MEDIA_TYPE
@@ -119,7 +119,7 @@
                  HAS_RSS_FEED, 
"http//www.livejournal.com/community/ajoyforever/data/rss");

          testSite("http//www.livejournal.com/users/_jb_/12332.html",
-                 BlogService.LIVEJOURNAL, 2,
+                 new LiveJournal(), 2,
                   new String[] {
                                  FeedReference.ATOM_MEDIA_TYPE,
                                  FeedReference.RSS_MEDIA_TYPE
@@ -133,33 +133,33 @@
      }

      public void testDiaryLand() throws Exception {
-        System.out.println("\nTesting DiaryLand...");
+        System.out.println("\nTesting DiaryLand... No tests currently");
          // FIXME Test this
      }

      public void testMovableType() throws Exception {
-        System.out.println("\nTesting MovableType...");
+        System.out.println("\nTesting MovableType... No tests currently");
          // FIXME Test this
      }

      public void testXanga() throws Exception {
          System.out.println("\nTesting Xanga...");
          testSite("http//www.xanga.com/home.aspx?user=lithium98",
-                 BlogService.XANGA, 1,
+                 new Xanga(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { 
"http//www.xanga.com/rss.aspx?user=lithium98" },
                   NO_ATOM_FEED, null,
                   HAS_RSS_FEED, 
"http//www.xanga.com/rss.aspx?user=lithium98");

          testSite("http//www.xanga.com/home.aspx?user=ChUnSA_86",
-                 BlogService.XANGA, 1,
+                 new Xanga(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { 
"http//www.xanga.com/rss.aspx?user=ChUnSA_86" },
                   NO_ATOM_FEED, null,
                   HAS_RSS_FEED, 
"http//www.xanga.com/rss.aspx?user=ChUnSA_86");

          testSite("http//www.xanga.com/home.aspx?user=wdfphillz",
-                 BlogService.XANGA, 1,
+                 new Xanga(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { 
"http//www.xanga.com/rss.aspx?user=wdfphillz" },
                   NO_ATOM_FEED, null,
@@ -169,7 +169,7 @@
          // expand resources inside of the Feed Parser; we don't
          // currently do this yet, Brad Neuberg, bkn3@columbia.edu
          /*testSite("http//xanga.com/home.aspx?user=joe",
-                 BlogService.XANGA, 1,
+                 new Xanga(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { "http//www.xanga.com/rss.aspx?user=joe" },
                   NO_ATOM_FEED, null,
@@ -178,8 +178,9 @@

      public void testWordPress() throws Exception {
          System.out.println("\nTesting WordPress...");
-        testSite("http//synflood.at/blog/",
-                 BlogService.WORDPRESS, 3,
+        // This site went down
+        /*testSite("http//zh.yazzy.org/blog/index.php",
+                 new WordPress(), 3,
                   new String[] {
                                  FeedReference.ATOM_MEDIA_TYPE,
                                  FeedReference.RSS_MEDIA_TYPE,
@@ -192,9 +193,29 @@
                                },
                   HAS_ATOM_FEED, "http//synflood.at/blog/wp-atom.php",
                   HAS_RSS_FEED, "http//synflood.at/blog/wp-rss2.php");
-
+        */
+        // We need to firm up our autodiscovery regular expressions before
+        // this will pass; what happens is it has autodiscovery, but those
+        // point to a different location than the usual ones aggresive
+        // discovery would find (which are also there).  We get back different
+        // results at different times
+        /*testSite("http//zh.yazzy.org/blog/index.php",
+                 new WordPress(), 3,
+                 new String[] {
+                                FeedReference.ATOM_MEDIA_TYPE,
+                                FeedReference.RSS_MEDIA_TYPE,
+                                FeedReference.RSS_MEDIA_TYPE
+                              },
+                 new String[] {
+                                "http//zh.yazzy.org/blog/wp-atom.php",
+                                "http//zh.yazzy.org/blog/wp-rss2.php",
+                                "http//zh.yazzy.org/blog/wp-rss.php"
+                              },
+                 HAS_ATOM_FEED, "http//zh.yazzy.org/blog/wp-atom.php",
+                 HAS_RSS_FEED, "http//zh.yazzy.org/blog/wp-rss2.php");
+        */
          testSite("http//holmes.hgen.pitt.edu/~dweeks/wordpress/",
-                 BlogService.WORDPRESS, 3,
+                 new WordPress(), 3,
                   new String[] {
                                  FeedReference.ATOM_MEDIA_TYPE,
                                  FeedReference.RSS_MEDIA_TYPE,
@@ -221,7 +242,7 @@
          */
          testProbeLocator(
                   "http//journals.aol.com/redhdka/BrandNewDay/",
-                 BlogService.AOL_JOURNAL, 1,
+                 new AOLJournal(), 1,
                   new String[] {
                                  FeedReference.RSS_MEDIA_TYPE
                                },
@@ -232,7 +253,7 @@
                   HAS_RSS_FEED, 
"http//journals.aol.com/redhdka/brandnewday/rss.xml");
          testFeedLocator(
                   "http//journals.aol.com/redhdka/BrandNewDay/",
-                 BlogService.AOL_JOURNAL, 2,
+                 new AOLJournal(), 2,
                   new String[] {
                                  FeedReference.ATOM_MEDIA_TYPE,
                                  FeedReference.RSS_MEDIA_TYPE
@@ -246,7 +267,7 @@

          testProbeLocator(
                   "http//journals.aol.com/goldenchildnc/GCS/",
-                 BlogService.AOL_JOURNAL, 1,
+                 new AOLJournal(), 1,
                   new String[] {
                                  FeedReference.RSS_MEDIA_TYPE
                                },
@@ -257,7 +278,7 @@
                   HAS_RSS_FEED, 
"http//journals.aol.com/goldenchildnc/GCS/rss.xml");
          testFeedLocator(
                   "http//journals.aol.com/goldenchildnc/GCS/",
-                 BlogService.AOL_JOURNAL, 2,
+                 new AOLJournal(), 2,
                   new String[] {
                                  FeedReference.ATOM_MEDIA_TYPE,
                                  FeedReference.RSS_MEDIA_TYPE
@@ -272,7 +293,7 @@

          testProbeLocator(
                   "http//journals.aol.com/mkgninja/MelissasMisunderstandingsofLife/", 

-                 BlogService.AOL_JOURNAL, 1,
+                 new AOLJournal(), 1,
                   new String[] {
                                  FeedReference.RSS_MEDIA_TYPE
                                },
@@ -283,7 +304,7 @@
                   HAS_RSS_FEED, 
"http//journals.aol.com/mkgninja/MelissasMisunderstandingsofLife/rss.xml");
          testFeedLocator(
                   "http//journals.aol.com/mkgninja/MelissasMisunderstandingsofLife/", 

-                 BlogService.AOL_JOURNAL, 2,
+                 new AOLJournal(), 2,
                   new String[] {
                                  FeedReference.ATOM_MEDIA_TYPE,
                                  FeedReference.RSS_MEDIA_TYPE
@@ -303,7 +324,7 @@
          // However, we get a feed when we go through the FeedParser since
          // the site has autodiscovery
          testSite("http//lynikers.typepad.com/",
-                 BlogService.TYPEPAD, 0,
+                 new Typepad(), 0,
                   new String[] { },
                   new String[] { },
                   HAS_ATOM_FEED, 
"http//lynikers.typepad.com/on_buck_lake/atom.xml",
@@ -312,14 +333,14 @@
          // This site has no feed that we can link probe for (it's in a 
different
          // location then usual).
          testSite("http//emmeke.typepad.com/",
-                 BlogService.TYPEPAD, 0,
+                 new Typepad(), 0,
                   new String[] { },
                   new String[] { },
                   NO_ATOM_FEED, null,
                   HAS_RSS_FEED, "http//emmeke.typepad.com/blog/index.rdf");

          testSite("http//www.prettypolitical.com/",
-                 BlogService.TYPEPAD, 2,
+                 new Typepad(), 2,
                   new String[] {
                                  FeedReference.ATOM_MEDIA_TYPE,
                                  FeedReference.RSS_MEDIA_TYPE
@@ -336,7 +357,7 @@
          System.out.println("\nTesting GreyMatter...");
          // No feeds supported
          testSite("http//www.chattbike.com/gilligan/",
-                 BlogService.GREYMATTER, 0,
+                 new GreyMatter(), 0,
                   new String[] { },
                   new String[] { },
                   NO_ATOM_FEED, null,
@@ -344,7 +365,7 @@

          // No feeds supported
          testSite("http//www.electricedge.com/greymatter/",
-                 BlogService.GREYMATTER, 0,
+                 new GreyMatter(), 0,
                   new String[] { },
                   new String[] { },
                   NO_ATOM_FEED, null,
@@ -354,28 +375,28 @@
      public void testPMachine() throws Exception {
          System.out.println("\nTesting PMachine...");
          testSite("http//bamph.com",
-                 BlogService.UNKNOWN, 1,
+                 new Unknown(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { "http//bamph.com/index.xml" },
                   NO_ATOM_FEED, null,
                   HAS_RSS_FEED, "http//bamph.com/index.xml");

          testSite("http//bucsfishingreport.com/pMachine/weblog.php",
-                 BlogService.PMACHINE, 1,
+                 new PMachine(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { 
"http//bucsfishingreport.com/pMachine/index.xml" },
                   NO_ATOM_FEED, null,
                   HAS_RSS_FEED, 
"http//bucsfishingreport.com/pMachine/index.xml");

          testSite("http//www.simplekindoflife.com/pMachine/weblog.php",
-                 BlogService.PMACHINE, 1,
+                 new PMachine(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { 
"http//www.simplekindoflife.com/pMachine/index.xml" },
                   NO_ATOM_FEED, null,
                   HAS_RSS_FEED, 
"http//www.simplekindoflife.com/pMachine/index.xml");

          testSite("http//www.mondfish.net/pmachine/weblog.php",
-                 BlogService.PMACHINE, 1,
+                 new PMachine(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { 
"http//www.mondfish.net/pmachine/index.xml" },
                   NO_ATOM_FEED, null,
@@ -385,14 +406,14 @@
      public void testBlosxom() throws Exception {
          System.out.println("\nTesting Blosxom...");
          testSite("http//mikemason.ca/",
-                 BlogService.BLOSXOM, 1,
+                 new Blosxom(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { "http//mikemason.ca/index.rss" },
                   NO_ATOM_FEED, null,
                   HAS_RSS_FEED, "http//mikemason.ca/index.rss");

          testSite("http//www.foobargeek.com/",
-                 BlogService.BLOSXOM, 1,
+                 new Blosxom(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { "http//www.foobargeek.com/index.rss" },
                   NO_ATOM_FEED, null,
@@ -401,14 +422,14 @@
          // The FeedParser gets a different location for the XML file then
          // through the aggresive prober for this feed
          testSite("http//www.pipetree.com/qmacro/",
-                 BlogService.BLOSXOM, 1,
+                 new Blosxom(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { "http//www.pipetree.com/qmacro/index.rss" },
                   NO_ATOM_FEED, null,
                   HAS_RSS_FEED, "http//www.pipetree.com/qmacro/xml");

          testSite("http//www.bitbucketheaven.com/cgi-bin/blosxom.cgi",
-                 BlogService.BLOSXOM, 1,
+                 new Blosxom(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { 
"http//www.bitbucketheaven.com/cgi-bin/blosxom.cgi/index.rss" },
                   NO_ATOM_FEED, null,
@@ -418,21 +439,21 @@
      public void testRadioUserland() throws Exception {
          System.out.println("\nTesting Radio Userland...");
          testSite("http//radio.weblogs.com/0131722/",
-                 BlogService.RADIO_USERLAND, 1,
+                 new RadioUserland(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { "http//radio.weblogs.com/0131722/rss.xml" },
                   NO_ATOM_FEED, null,
                   HAS_RSS_FEED, "http//radio.weblogs.com/0131722/rss.xml");

          testSite("http//radio.weblogs.com/0131724/",
-                 BlogService.RADIO_USERLAND, 1,
+                 new RadioUserland(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { "http//radio.weblogs.com/0131724/rss.xml" },
                   NO_ATOM_FEED, null,
                   HAS_RSS_FEED, "http//radio.weblogs.com/0131724/rss.xml");

          testSite("http//radio.weblogs.com/0131734/",
-                 BlogService.RADIO_USERLAND, 1,
+                 new RadioUserland(), 1,
                   new String[] { FeedReference.RSS_MEDIA_TYPE },
                   new String[] { "http//radio.weblogs.com/0131734/rss.xml" },
                   NO_ATOM_FEED, null,
@@ -442,7 +463,7 @@
      public void testTextPattern() throws Exception {
          System.out.println("\nTesting TextPattern...");
          testSite("http//www.digitalmediaminute.com/",
-                 BlogService.TEXTPATTERN, 2,
+                 new TextPattern(), 2,
                   new String[] {
                                  FeedReference.ATOM_MEDIA_TYPE,
                                  FeedReference.RSS_MEDIA_TYPE
@@ -458,7 +479,7 @@
      public void testTextAmerica() throws Exception {
          System.out.println("\nTesting TextAmerica...");
          testSite("http//morganwebb.textamerica.com/",
-                 BlogService.TEXTAMERICA, 1,
+                 new TextAmerica(), 1,
                   new String[] {
                                  FeedReference.RSS_MEDIA_TYPE
                                },
@@ -469,7 +490,7 @@
                   HAS_RSS_FEED, "http//morganwebb.textamerica.com/rss.aspx");

          testSite("http//northlan.textamerica.com/",
-                 BlogService.TEXTAMERICA, 1,
+                 new TextAmerica(), 1,
                   new String[] {
                                  FeedReference.RSS_MEDIA_TYPE
                                },
@@ -480,7 +501,7 @@
                   HAS_RSS_FEED, "http//northlan.textamerica.com/rss.aspx");

          testSite("http//mycamphone.textamerica.com/",
-                 BlogService.TEXTAMERICA, 1,
+                 new TextAmerica(), 1,
                   new String[] {
                                  FeedReference.RSS_MEDIA_TYPE
                                },
@@ -542,7 +563,7 @@
          FeedList list = new FeedList();
          ProbeLocator.locate(resource, content, list);
          assertEquals(numberOfFeeds, list.size());
-
+
          FeedReference[] feeds = (FeedReference[])list.toArray(new 
FeedReference[list.size()]);
          assertEquals(numberOfFeeds, feeds.length);




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message