Revision 4127
Added by daigle almost 16 years ago
QuerySpecificationTest.java | ||
---|---|---|
27 | 27 |
import java.io.FileNotFoundException; |
28 | 28 |
import java.io.FileReader; |
29 | 29 |
import java.io.IOException; |
30 |
import java.util.Hashtable; |
|
31 | 30 |
|
32 | 31 |
import junit.framework.Test; |
33 | 32 |
import junit.framework.TestCase; |
... | ... | |
36 | 35 |
import edu.ucsb.nceas.metacat.QuerySpecification; |
37 | 36 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
38 | 37 |
import edu.ucsb.nceas.metacat.util.MetaCatUtil; |
39 |
import edu.ucsb.nceas.utilities.Options; |
|
40 | 38 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
41 | 39 |
|
42 | 40 |
/** |
... | ... | |
91 | 89 |
"OR (xml_index.nodeid=xml_nodes.nodeid AND ( xml_index.path IN ( '/eml/@packageId', '/eml/dataset/access/@authSystem' , '/eml/dataset/access/@order' ) AND xml_nodes.nodetype = 'ATTRIBUTE'))) "+ |
92 | 90 |
"AND xml_nodes.docid in ('obfs.45337', 'obfs.45338', 'obfs.45346')"; |
93 | 91 |
|
94 |
/* Initialize Options*/
|
|
92 |
/* Initialize properties*/
|
|
95 | 93 |
static |
96 | 94 |
{ |
97 | 95 |
try |
98 | 96 |
{ |
99 |
Options.initialize(new File("build/tests/metacat.properties"));
|
|
97 |
PropertyService.getInstance("build/tests");
|
|
100 | 98 |
MetaCatUtil.pathsForIndexing |
101 | 99 |
= MetaCatUtil.getOptionList(PropertyService.getProperty("indexPaths")); |
102 | 100 |
} |
... | ... | |
123 | 121 |
{ |
124 | 122 |
super.setUp(); |
125 | 123 |
try { |
126 |
File propertyFile = new File("./lib/metacat.properties"); |
|
127 |
Options options = Options.initialize(propertyFile); |
|
124 |
PropertyService.getInstance("build/tests"); |
|
128 | 125 |
String xmlfile = "./test/query.xml"; |
129 | 126 |
xml = new FileReader(new File(xmlfile)); |
130 | 127 |
} catch (FileNotFoundException e) { |
131 | 128 |
fail(e.getMessage()); |
132 |
} catch (IOException e) { |
|
133 |
fail(e.getMessage()); |
|
134 |
} |
|
129 |
} |
|
135 | 130 |
} |
136 | 131 |
|
137 | 132 |
/** |
Also available in: Unified diff
Replace Options class with PropertyService and create PropertyService using log directory name instead of servlet context