1 2 package org.roller.util; 3 4 import org.roller.presentation.bookmarks.BookmarksActionTest; 5 6 import junit.framework.Test; 7 import junit.framework.TestCase; 8 import junit.framework.TestSuite; 9 10 13 public class LinkbackExtractorTest extends TestCase 14 { 15 19 public LinkbackExtractorTest(String arg0) 20 { 21 super(arg0); 22 } 23 24 public static void main(String [] args) 25 { 26 } 27 28 31 protected void setUp() throws Exception 32 { 33 super.setUp(); 34 } 35 36 39 protected void tearDown() throws Exception 40 { 41 super.tearDown(); 42 } 43 44 public void testLinkbackExtractor() throws Exception 45 { 46 String [][] testrefs = new String [][] 47 { 48 { 49 "http://www.rollerweblogger.org/page/roller", 50 "http://staff.develop.com/halloway/weblog/2003/01/23.html" 51 }, 52 { 53 "http://postneo.com/", 54 "http://www.rollerweblogger.org/page/roller/20030125" 55 } 56 }; 57 58 for ( int i=0; i<testrefs.length; i++ ) 59 { 60 String refurl = testrefs[i][0]; 61 String requrl = testrefs[i][1]; 62 LinkbackExtractor le = new LinkbackExtractor(refurl,requrl); 63 System.out.println(le.getTitle()); 64 System.out.println(le.getPermalink()); 65 System.out.println(le.getExcerpt()); 66 } 67 } 68 69 public static Test suite() 70 { 71 return new TestSuite(LinkbackExtractorTest.class); 72 } 73 } 74 | Popular Tags |