mirror of https://github.com/apache/lucene.git
tests: convert to junit4
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1024312 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
72e081de1a
commit
933ebe5522
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.apache.solr.handler;
|
||||
|
||||
import org.apache.solr.util.AbstractSolrTestCase;
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import java.io.StringReader;
|
||||
import java.util.Collection;
|
||||
|
||||
|
@ -24,26 +24,20 @@ import javax.xml.stream.XMLInputFactory;
|
|||
import javax.xml.stream.XMLStreamReader;
|
||||
|
||||
import org.apache.solr.common.SolrInputDocument;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
public class XmlUpdateRequestHandlerTest extends AbstractSolrTestCase
|
||||
{
|
||||
private XMLInputFactory inputFactory = XMLInputFactory.newInstance();
|
||||
protected XmlUpdateRequestHandler handler;
|
||||
public class XmlUpdateRequestHandlerTest extends SolrTestCaseJ4 {
|
||||
private static XMLInputFactory inputFactory = XMLInputFactory.newInstance();
|
||||
protected static XmlUpdateRequestHandler handler;
|
||||
|
||||
@Override public String getSchemaFile() { return "schema.xml"; }
|
||||
@Override public String getSolrConfigFile() { return "solrconfig.xml"; }
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
@BeforeClass
|
||||
public static void beforeTests() throws Exception {
|
||||
initCore("solrconfig.xml","schema.xml");
|
||||
handler = new XmlUpdateRequestHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadDoc() throws Exception
|
||||
{
|
||||
String xml =
|
||||
|
|
|
@ -20,17 +20,23 @@ package org.apache.solr.handler.component;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import org.apache.solr.common.util.NamedList;
|
||||
import org.apache.solr.core.SolrCore;
|
||||
import org.apache.solr.util.AbstractSolrTestCase;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
public class SearchHandlerTest extends AbstractSolrTestCase
|
||||
public class SearchHandlerTest extends SolrTestCaseJ4
|
||||
{
|
||||
@Override public String getSchemaFile() { return "schema.xml"; }
|
||||
@Override public String getSolrConfigFile() { return "solrconfig.xml"; }
|
||||
@BeforeClass
|
||||
public static void beforeTests() throws Exception {
|
||||
initCore("solrconfig.xml","schema.xml");
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void testInitalization()
|
||||
{
|
||||
SolrCore core = h.getCore();
|
||||
|
|
|
@ -17,9 +17,12 @@
|
|||
|
||||
package org.apache.solr.schema;
|
||||
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import org.apache.solr.core.SolrCore;
|
||||
import org.apache.solr.schema.SchemaField;
|
||||
import org.apache.solr.util.AbstractSolrTestCase;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* This is a simple test to make sure the unique key is not required
|
||||
|
@ -27,22 +30,14 @@ import org.apache.solr.util.AbstractSolrTestCase;
|
|||
*
|
||||
* It needs its own file so it can load a special schema file
|
||||
*/
|
||||
public class NotRequiredUniqueKeyTest extends AbstractSolrTestCase {
|
||||
public class NotRequiredUniqueKeyTest extends SolrTestCaseJ4 {
|
||||
|
||||
@Override public String getSchemaFile() { return "schema-not-required-unique-key.xml"; }
|
||||
@Override public String getSolrConfigFile() { return "solrconfig.xml"; }
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
@BeforeClass
|
||||
public static void beforeTests() throws Exception {
|
||||
initCore("solrconfig.xml","schema-not-required-unique-key.xml");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testSchemaLoading()
|
||||
{
|
||||
SolrCore core = h.getCore();
|
||||
|
|
Loading…
Reference in New Issue