LUCENE-3795: use LuceneTestCase for all tests, propagate super.setUp in SpatialPrefixTreeTest

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1300428 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-03-14 00:38:44 +00:00
parent 22b145e43e
commit f7cf65f76c
3 changed files with 9 additions and 7 deletions

View File

@ -22,6 +22,8 @@ import com.spatial4j.core.context.simple.SimpleSpatialContext;
import com.spatial4j.core.query.SpatialArgsParser;
import com.spatial4j.core.query.SpatialOperation;
import com.spatial4j.core.shape.Rectangle;
import org.apache.lucene.util.LuceneTestCase;
import org.junit.Assert;
import org.junit.Test;
@ -35,7 +37,7 @@ import java.util.List;
/**
* Make sure we are reading the tests as expected
*/
public class TestTestFramework {
public class TestTestFramework extends LuceneTestCase {
@Test
public void testQueries() throws IOException {

View File

@ -17,6 +17,7 @@
package org.apache.lucene.spatial.prefix;
import org.apache.lucene.util.LuceneTestCase;
import org.junit.Test;
import java.util.Arrays;
@ -26,7 +27,7 @@ import java.util.List;
/**
* This is just a quick idea for *simple* tests
*/
public class TestSpatialPrefixField {
public class TestSpatialPrefixField extends LuceneTestCase {
@Test
public void testRawTokens() {

View File

@ -20,14 +20,12 @@ package org.apache.lucene.spatial.prefix.tree;
import com.spatial4j.core.context.simple.SimpleSpatialContext;
import com.spatial4j.core.shape.Rectangle;
import com.spatial4j.core.shape.Shape;
import org.apache.lucene.util.LuceneTestCase;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class SpatialPrefixTreeTest {
public class SpatialPrefixTreeTest extends LuceneTestCase {
//TODO plug in others and test them
private SimpleSpatialContext ctx;
@ -35,6 +33,7 @@ public class SpatialPrefixTreeTest {
@Before
public void setUp() throws Exception {
super.setUp();
ctx = SimpleSpatialContext.GEO_KM;
trie = new GeohashPrefixTree(ctx,4);
}