Project

General

Profile

« Previous | Next » 

Revision 3566

Added by Jing Tao over 16 years ago

Add code to initialize Options. Otherwise will get null exception.

View differences:

HarvesterTest.java
27 27

  
28 28
package edu.ucsb.nceas.metacattest.harvesterClient;
29 29

  
30
import edu.ucsb.nceas.metacat.MetaCatUtil;
30 31
import edu.ucsb.nceas.metacat.harvesterClient.Harvester;
31 32
import edu.ucsb.nceas.utilities.Options;
32 33
import java.io.File;
......
44 45
public class HarvesterTest extends TestCase {
45 46

  
46 47
  private Harvester harvester;
47
  
48
  /* Initialize Options*/
49
  static
50
  {
51
	  try
52
	  {
53
		  Options.initialize(new File("build/tests/metacat.properties"));
54
		  MetaCatUtil.pathsForIndexing 
55
		         = MetaCatUtil.getOptionList(MetaCatUtil.getOption("indexPaths"));
56
	  }
57
	  catch(Exception e)
58
	  {
59
		  System.err.println("Exception in initialize option in MetacatServletNetTest "+e.getMessage());
60
	  }
61
  }
48 62

  
49 63
  /**
50 64
   * Constructor for this test.

Also available in: Unified diff