View Javadoc

1   /* RecoveryJournalTest
2    * 
3    * Created on Apr 18, 2005
4    *
5    * Copyright (C) 2005 Internet Archive.
6    * 
7    * This file is part of the Heritrix web crawler (crawler.archive.org).
8    * 
9    * Heritrix is free software; you can redistribute it and/or modify
10   * it under the terms of the GNU Lesser Public License as published by
11   * the Free Software Foundation; either version 2.1 of the License, or
12   * any later version.
13   * 
14   * Heritrix is distributed in the hope that it will be useful, 
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   * GNU Lesser Public License for more details.
18   * 
19   * You should have received a copy of the GNU Lesser Public License
20   * along with Heritrix; if not, write to the Free Software
21   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22   */
23  package org.archive.crawler.frontier;
24  
25  import org.apache.commons.httpclient.URIException;
26  import org.archive.util.TmpDirTestCase;
27  
28  /***
29   * @author stack
30   * @version $Date: 2006-09-26 20:38:48 +0000 (Tue, 26 Sep 2006) $, $Revision: 4667 $
31   */
32  public class RecoveryJournalTest extends TmpDirTestCase {
33      private RecoveryJournal rj;
34  
35      protected void setUp() throws Exception {
36          super.setUp();
37          this.rj = new RecoveryJournal(this.getTmpDir().getAbsolutePath(),
38              this.getClass().getName());
39      }
40  
41      protected void tearDown() throws Exception {
42          super.tearDown();
43          if (this.rj != null) {
44              this.rj.close();
45          }
46      }
47  
48      public static void main(String [] args) {
49          junit.textui.TestRunner.run(RecoveryJournalTest.class);
50      }
51  
52      public void testAdded() throws URIException {
53          /*
54          CandidateURI c = new CandidateURI(UURIFactory.
55              getInstance("http://www.archive.org"), "LLLLL",
56              UURIFactory.getInstance("http://archive.org"),
57              "L");
58          this.rj.added(new CrawlURI(c, 0));
59          this.rj.added(new CrawlURI(c, 1));
60          this.rj.added(new CrawlURI(c, 2));
61          */
62      }
63  
64  }