Revision 4080
Added by daigle about 16 years ago
EventLogTest.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
import edu.ucsb.nceas.metacat.DBConnectionPool; |
34 | 34 |
import edu.ucsb.nceas.metacat.EventLog; |
35 |
import edu.ucsb.nceas.metacat.MetaCatUtil;
|
|
35 |
import edu.ucsb.nceas.metacat.util.SystemUtil;
|
|
36 | 36 |
import edu.ucsb.nceas.utilities.Options; |
37 | 37 |
|
38 | 38 |
import junit.framework.TestCase; |
... | ... | |
44 | 44 |
*/ |
45 | 45 |
public class EventLogTest extends TestCase |
46 | 46 |
{ |
47 |
/* Initialize Options*/ |
|
48 |
static |
|
49 |
{ |
|
50 |
try |
|
51 |
{ |
|
52 |
Options.initialize(new File("build/tests/metacat.properties")); |
|
53 |
MetaCatUtil.pathsForIndexing |
|
54 |
= MetaCatUtil.getOptionList(MetaCatUtil.getOption("indexPaths")); |
|
55 |
} |
|
56 |
catch(Exception e) |
|
57 |
{ |
|
58 |
System.err.println("Exception in initialize option in MetacatServletNetTest "+e.getMessage()); |
|
59 |
} |
|
60 |
} |
|
61 |
|
|
62 |
private String propertyFileName = |
|
63 |
MetaCatUtil.getOption("installDir") + "/WEB-INF/metacat.properties"; |
|
47 |
private String propertyFileName = null; |
|
64 | 48 |
|
65 | 49 |
protected void setUp() throws Exception |
66 | 50 |
{ |
51 |
propertyFileName = SystemUtil.getContextDir() + "/WEB-INF/metacat.properties"; |
|
52 |
|
|
67 | 53 |
super.setUp(); |
68 | 54 |
try { |
69 | 55 |
File propertyFile = new File(propertyFileName); |
70 | 56 |
Options options = Options.initialize(propertyFile); |
71 |
MetaCatUtil util = new MetaCatUtil(); |
|
72 | 57 |
DBConnectionPool pool = DBConnectionPool.getInstance(); |
73 | 58 |
} catch (FileNotFoundException e) { |
74 | 59 |
fail(e.getMessage()); |
Also available in: Unified diff
Merge 1.9 changes into Head