Project

General

Profile

« Previous | Next » 

Revision 7784

Added by Jing Tao over 11 years ago

Change the code since the ApplicationController's constructor was changed.

View differences:

metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/ApplicationControllerIT.java
15 15
     */
16 16
    @Test
17 17
    public void testConstructor() throws Exception {
18
        ApplicationController controller = new ApplicationController();
18
        String springConfigFile = "src/main/resources/index-processor-context.xml";
19
        String metacatPropertyFile = null; //in this test, we use the test.properties file rather than metacat.properties file. so set it to be null.
20
        ApplicationController controller = new ApplicationController(springConfigFile, metacatPropertyFile);
21
        controller.initialize();
19 22
        List<SolrIndex> list = controller.getSolrIndexes();
20 23
        assertTrue(list.size() == 1);
21 24
        SolrIndex[] solrIndexesarray = list.toArray(new SolrIndex[list.size()]);
metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/SolrIndexIT.java
47 47
    }
48 48
    
49 49
    private SolrIndex generateSolrIndex() throws Exception {
50
        ApplicationController controller = new ApplicationController();
50
        String springConfigFile = "src/main/resources/index-processor-context.xml";
51
        String metacatPropertyFile = null; //in this test, we use the test.properties file rather than metacat.properties file. so set it to be null.
52
        ApplicationController controller = new ApplicationController(springConfigFile, metacatPropertyFile);
53
        controller.initialize();
51 54
        List<SolrIndex> list = controller.getSolrIndexes();
52 55
        SolrIndex[] solrIndexesarray = list.toArray(new SolrIndex[list.size()]);
53 56
        SolrIndex index = solrIndexesarray[0];
metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/IndexGeneratorIT.java
43 43
    }
44 44
    
45 45
    private SolrIndex generateSolrIndex() throws Exception {
46
        ApplicationController controller = new ApplicationController();
46
        String springConfigFile = "src/main/resources/index-processor-context.xml";
47
        String metacatPropertyFile = null; //in this test, we use the test.properties file rather than metacat.properties file. so set it to be null.
48
        ApplicationController controller = new ApplicationController(springConfigFile, metacatPropertyFile);
49
        controller.initialize();
47 50
        List<SolrIndex> list = controller.getSolrIndexes();
48 51
        SolrIndex[] solrIndexesarray = list.toArray(new SolrIndex[list.size()]);
49 52
        SolrIndex index = solrIndexesarray[0];

Also available in: Unified diff