Revision 7586
Added by ben leinfelder almost 11 years ago
ApplicationControllerIT.java | ||
---|---|---|
1 | 1 |
package edu.ucsb.nceas.metacat.index; |
2 | 2 |
|
3 |
import static org.junit.Assert.assertEquals; |
|
4 | 3 |
import static org.junit.Assert.assertTrue; |
5 | 4 |
|
6 | 5 |
import java.util.List; |
7 | 6 |
|
8 | 7 |
import org.dataone.cn.indexer.parser.IDocumentSubprocessor; |
9 | 8 |
import org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor; |
10 |
import org.dataone.configuration.Settings; |
|
11 | 9 |
import org.junit.Test; |
12 | 10 |
|
13 | 11 |
public class ApplicationControllerIT { |
14 |
public static final String pathToHazelcastFile = "../lib/hazelcast.xml"; |
|
15 | 12 |
|
16 | 13 |
/** |
17 | 14 |
* Test lookup from default properties file |
18 | 15 |
*/ |
19 | 16 |
@Test |
20 | 17 |
public void testConstructor() { |
21 |
Settings.getConfiguration().setProperty("dataone.hazelcast.configFilePath", pathToHazelcastFile); |
|
22 | 18 |
ApplicationController controller = new ApplicationController(); |
23 | 19 |
List<SolrIndex> list = controller.getSolrIndexes(); |
24 | 20 |
assertTrue(list.size() == 1); |
Also available in: Unified diff
rely on Settings loaded from test resources config rather than hardcoding the paths in code. https://projects.ecoinformatics.org/ecoinfo/issues/5918