KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > roller > util > LinkbackExtractorTest


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 /**
11  * @author davidj
12  */

13 public class LinkbackExtractorTest extends TestCase
14 {
15     /**
16      * Constructor for LinkbackExtractorTest.
17      * @param arg0
18      */

19     public LinkbackExtractorTest(String JavaDoc arg0)
20     {
21         super(arg0);
22     }
23
24     public static void main(String JavaDoc[] args)
25     {
26     }
27
28     /**
29      * @see TestCase#setUp()
30      */

31     protected void setUp() throws Exception JavaDoc
32     {
33         super.setUp();
34     }
35
36     /**
37      * @see TestCase#tearDown()
38      */

39     protected void tearDown() throws Exception JavaDoc
40     {
41         super.tearDown();
42     }
43
44     public void testLinkbackExtractor() throws Exception JavaDoc
45     {
46         String JavaDoc[][] testrefs = new String JavaDoc[][]
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 JavaDoc refurl = testrefs[i][0];
61             String JavaDoc 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