Project

General

Profile

« Previous | Next » 

Revision 8117

Added by Jing Tao almost 11 years ago

Add a junit test file.

View differences:

metacat-common/src/test/java/edu/ucsb/nceas/metacat/common/SolrServerFactoryTest.java
1
package edu.ucsb.nceas.metacat.common;
2

  
3
import static org.junit.Assert.assertTrue;
4

  
5
import java.io.FileNotFoundException;
6
import java.io.IOException;
7
import java.util.List;
8

  
9
import org.apache.commons.configuration.ConfigurationException;
10
import org.apache.solr.client.solrj.SolrServer;
11
import org.junit.Before;
12
import org.junit.Test;
13

  
14
import edu.ucsb.nceas.metacat.common.query.EnabledQueryEngines;
15

  
16
public class SolrServerFactoryTest extends MetacatCommonTestBase {
17
    /**
18
     * The setup method
19
     */
20
    @Before
21
    public void setup () throws FileNotFoundException, ConfigurationException, IOException {
22
        super.setup();
23
    }
24
    
25
    @Test
26
    public void testCreateSolrServer() throws Exception {
27
        SolrServer server = SolrServerFactory.createSolrServer();
28
        if(server == null) {
29
            assertTrue("testCreateSolrServer - the server shouldn't be null", true);
30
        }
31
    }
32
}

Also available in: Unified diff