tests: convert jetty/examples to junit4

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@927657 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-03-26 00:53:59 +00:00
parent 8d32610c29
commit cf05c92057
1 changed files with 8 additions and 17 deletions

View File

@ -19,6 +19,7 @@ package org.apache.solr.client.solrj.response;
import java.util.List;
import junit.framework.Assert;
import org.apache.solr.client.solrj.SolrJettyTestBase;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.common.SolrInputDocument;
@ -26,30 +27,20 @@ import org.apache.solr.client.solrj.SolrExampleTestBase;
import org.apache.solr.client.solrj.request.QueryRequest;
import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer;
import org.apache.solr.client.solrj.response.TermsResponse.Term;
import org.junit.BeforeClass;
import org.junit.Test;
/**
* Test for TermComponent's response in Solrj
*/
public class TermsResponseTest extends SolrExampleTestBase {
public class TermsResponseTest extends SolrJettyTestBase {
SolrServer server;
@Override
public void setUp() throws Exception {
super.setUp();
server = createNewSolrServer();
}
@Override
protected SolrServer getSolrServer() {
return server;
}
@Override
protected SolrServer createNewSolrServer() {
return new EmbeddedSolrServer(h.getCoreContainer(), "");
@BeforeClass
public static void beforeTest() throws Exception {
initCore(EXAMPLE_CONFIG, EXAMPLE_SCHEMA, EXAMPLE_HOME);
}
@Test
public void testTermsResponse() throws Exception {
SolrInputDocument doc = new SolrInputDocument();
doc.setField("id", 1);