1 18 19 package org.apache.roller.util; 20 21 import org.apache.roller.ui.authoring.struts.actions.BookmarksActionTest; 22 23 import junit.framework.Test; 24 import junit.framework.TestCase; 25 import junit.framework.TestSuite; 26 27 30 public class LinkbackExtractorTest extends TestCase 31 { 32 36 public LinkbackExtractorTest(String arg0) 37 { 38 super(arg0); 39 } 40 41 public static void main(String [] args) 42 { 43 } 44 45 48 protected void setUp() throws Exception 49 { 50 super.setUp(); 51 } 52 53 56 protected void tearDown() throws Exception 57 { 58 super.tearDown(); 59 } 60 61 public void testLinkbackExtractor() throws Exception 62 { 63 String [][] testrefs = new String [][] 64 { 65 { 66 "http://www.rollerweblogger.org/page/roller", 67 "http://staff.develop.com/halloway/weblog/2003/01/23.html" 68 }, 69 { 70 "http://postneo.com/", 71 "http://www.rollerweblogger.org/page/roller/20030125" 72 } 73 }; 74 75 for ( int i=0; i<testrefs.length; i++ ) 76 { 77 String refurl = testrefs[i][0]; 78 String requrl = testrefs[i][1]; 79 LinkbackExtractor le = new LinkbackExtractor(refurl,requrl); 80 System.out.println(le.getTitle()); 81 System.out.println(le.getPermalink()); 82 System.out.println(le.getExcerpt()); 83 } 84 } 85 86 public static Test suite() 87 { 88 return new TestSuite(LinkbackExtractorTest.class); 89 } 90 } 91 | Popular Tags |