KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > nutch > parse > TestParseData


1 /* Copyright (c) 2003 The Nutch Organization. All rights reserved. */
2 /* Use subject to the conditions in http://www.nutch.org/LICENSE.txt. */
3
4 package net.nutch.parse;
5
6 import java.io.*;
7 import java.util.Properties JavaDoc;
8 import net.nutch.io.*;
9 import net.nutch.pagedb.*;
10 import junit.framework.TestCase;
11
12 /** Unit tests for ParseData. */
13
14 public class TestParseData extends TestCase {
15   public TestParseData(String JavaDoc name) { super(name); }
16
17   public void testParseData() throws Exception JavaDoc {
18
19     String JavaDoc 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 JavaDoc metaData = new Properties JavaDoc();
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