1 2 3 4 package net.nutch.parse; 5 6 import java.io.*; 7 import java.util.Properties ; 8 import net.nutch.io.*; 9 import net.nutch.pagedb.*; 10 import junit.framework.TestCase; 11 12 13 14 public class TestParseData extends TestCase { 15 public TestParseData(String name) { super(name); } 16 17 public void testParseData() throws Exception { 18 19 String title = "The Foo Page"; 20 21 Outlink[] outlinks = new Outlink[] { 22 new Outlink("http://foo.com/", "Foo"), 23 new Outlink("http://bar.com/", "Bar") 24 }; 25 26 Properties metaData = new Properties (); 27 metaData.put("Language", "en/us"); 28 metaData.put("Charset", "UTF-8"); 29 30 ParseData r = new ParseData(title, outlinks, metaData); 31 32 TestWritable.testWritable(r); 33 } 34 35 } 36 | Popular Tags |