1
|
package edu.ucsb.nceas.metacat.index;
|
2
|
|
3
|
import static org.junit.Assert.assertTrue;
|
4
|
|
5
|
import java.util.List;
|
6
|
|
7
|
import org.dataone.cn.indexer.parser.IDocumentSubprocessor;
|
8
|
import org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor;
|
9
|
import org.junit.Test;
|
10
|
|
11
|
public class ApplicationControllerIT {
|
12
|
|
13
|
/**
|
14
|
* Test lookup from default properties file
|
15
|
*/
|
16
|
@Test
|
17
|
public void testConstructor() {
|
18
|
ApplicationController controller = new ApplicationController();
|
19
|
List<SolrIndex> list = controller.getSolrIndexes();
|
20
|
assertTrue(list.size() == 1);
|
21
|
SolrIndex[] solrIndexesarray = list.toArray(new SolrIndex[list.size()]);
|
22
|
SolrIndex index = solrIndexesarray[0];
|
23
|
List<IDocumentSubprocessor> subprocessors = index.getSubprocessors();
|
24
|
IDocumentSubprocessor[] subprocessorArray = subprocessors.toArray(new IDocumentSubprocessor[subprocessors.size()]);
|
25
|
assertTrue(subprocessorArray[0] instanceof ScienceMetadataDocumentSubprocessor);
|
26
|
}
|
27
|
|
28
|
}
|