Revision 3567
Added by Jing Tao over 16 years ago
SubTreeTest.java | ||
---|---|---|
27 | 27 |
package edu.ucsb.nceas.metacattest; |
28 | 28 |
|
29 | 29 |
import edu.ucsb.nceas.metacat.*; |
30 |
import edu.ucsb.nceas.utilities.Options; |
|
30 | 31 |
//import edu.ucsb.nceas.morpho.framework.*; |
31 | 32 |
import junit.framework.Test; |
32 | 33 |
import junit.framework.TestCase; |
... | ... | |
47 | 48 |
{ |
48 | 49 |
private SubTree tree = null; |
49 | 50 |
private static final Log log = LogFactory.getLog("edu.ucsb.nceas.metacattest.ReplicationServerListTest"); |
50 |
|
|
51 |
/* Initialize Options*/ |
|
52 |
static |
|
53 |
{ |
|
54 |
try |
|
55 |
{ |
|
56 |
Options.initialize(new File("build/tests/metacat.properties")); |
|
57 |
MetaCatUtil.pathsForIndexing |
|
58 |
= MetaCatUtil.getOptionList(MetaCatUtil.getOption("indexPaths")); |
|
59 |
} |
|
60 |
catch(Exception e) |
|
61 |
{ |
|
62 |
System.err.println("Exception in initialize option in MetacatServletNetTest "+e.getMessage()); |
|
63 |
} |
|
64 |
} |
|
51 | 65 |
/** |
52 | 66 |
* Constructor to build the test |
53 | 67 |
* |
... | ... | |
155 | 169 |
log.debug("Error in SubTreeTest.suite: "+ e.getMessage()); |
156 | 170 |
}//catch |
157 | 171 |
|
158 |
while (!nodeStack.empty()) |
|
172 |
while (nodeStack != null && !nodeStack.empty())
|
|
159 | 173 |
{ |
160 | 174 |
NodeRecord node =(NodeRecord)nodeStack.pop(); |
161 | 175 |
String nodeType = node.getNodeType(); |
... | ... | |
173 | 187 |
log.debug("text: " + node.getNodeData()); |
174 | 188 |
} |
175 | 189 |
} |
176 |
assertTrue(1 == 1); |
|
190 |
|
|
177 | 191 |
} |
178 | 192 |
} |
Also available in: Unified diff
Add code to initialize Options and some code clean up