Project

General

Profile

« Previous | Next » 

Revision 4127

Added by daigle about 16 years ago

Replace Options class with PropertyService and create PropertyService using log directory name instead of servlet context

View differences:

HarvestDetailLogTest.java
33 33
import edu.ucsb.nceas.metacat.harvesterClient.HarvestSiteSchedule;
34 34
import edu.ucsb.nceas.metacat.service.PropertyService;
35 35
import edu.ucsb.nceas.metacat.util.MetaCatUtil;
36
import edu.ucsb.nceas.utilities.Options;
37 36

  
38
import java.io.File;
39 37
import java.sql.Connection;
40 38
import junit.framework.Test;
41 39
import junit.framework.TestCase;
......
52 50
  private HarvestDetailLog harvestDetailLog;
53 51
  private HarvestDocument harvestDocument;
54 52
  private HarvestSiteSchedule harvestSiteSchedule;
55
  /* Initialize Options*/
53
  /* Initialize Properties*/
56 54
  static
57 55
  {
58 56
	  try
59 57
	  {
60
		  Options.initialize(new File("build/tests/metacat.properties"));
58
		  PropertyService.getInstance("build/tests");
61 59
		  MetaCatUtil.pathsForIndexing 
62 60
		         = MetaCatUtil.getOptionList(PropertyService.getProperty("indexPaths"));
63 61
	  }
......
105 103
    int updateFrequency = 1;
106 104
  
107 105
    harvester = new Harvester();
108
    Harvester.loadOptions(test);
106
    Harvester.loadProperties(test);
109 107
    conn = harvester.getConnection();  // initializes the database connection
110 108
    harvester.initLogIDs();
111 109
    harvestLogID = harvester.getHarvestLogID();

Also available in: Unified diff