From c19d5e62f3ebc4deb5a0d5f13733659124db51b8 Mon Sep 17 00:00:00 2001 From: David Pilato Date: Thu, 19 Dec 2013 09:56:19 +0100 Subject: [PATCH] Move tests to JUnit Closes #13. --- pom.xml | 42 ++++++++++--------- .../analysis/SimpleIcuAnalysisTests.java | 7 ++-- .../SimpleIcuCollationTokenFilterTests.java | 6 +-- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/pom.xml b/pom.xml index 2a8ae4faf9189..c8b0d9744557f 100644 --- a/pom.xml +++ b/pom.xml @@ -33,6 +33,11 @@ 0.90.8 4.6.0 + 1 + true + onerror + + INFO @@ -43,6 +48,19 @@ + + org.hamcrest + hamcrest-all + 1.3 + test + + + org.apache.lucene + lucene-test-framework + ${lucene.version} + test + + org.elasticsearch elasticsearch @@ -65,26 +83,10 @@ - org.testng - testng - 6.8 - test - - - org.hamcrest - hamcrest-core - - - junit - junit - - - - - - org.hamcrest - hamcrest-all - 1.3 + org.elasticsearch + elasticsearch + ${elasticsearch.version} + test-jar test diff --git a/src/test/java/org/elasticsearch/index/analysis/SimpleIcuAnalysisTests.java b/src/test/java/org/elasticsearch/index/analysis/SimpleIcuAnalysisTests.java index 43df9d270bec1..4fb6031bc92a6 100644 --- a/src/test/java/org/elasticsearch/index/analysis/SimpleIcuAnalysisTests.java +++ b/src/test/java/org/elasticsearch/index/analysis/SimpleIcuAnalysisTests.java @@ -29,15 +29,14 @@ import org.elasticsearch.index.settings.IndexSettingsModule; import org.elasticsearch.indices.analysis.IndicesAnalysisModule; import org.elasticsearch.indices.analysis.IndicesAnalysisService; -import org.testng.annotations.Test; +import org.elasticsearch.test.ElasticsearchTestCase; +import org.junit.Test; import static org.elasticsearch.common.settings.ImmutableSettings.Builder.EMPTY_SETTINGS; -import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.instanceOf; - /** */ -public class SimpleIcuAnalysisTests { +public class SimpleIcuAnalysisTests extends ElasticsearchTestCase { @Test public void testDefaultsIcuAnalysis() { diff --git a/src/test/java/org/elasticsearch/index/analysis/SimpleIcuCollationTokenFilterTests.java b/src/test/java/org/elasticsearch/index/analysis/SimpleIcuCollationTokenFilterTests.java index 987384c61c1a4..51fe755e9d6f2 100644 --- a/src/test/java/org/elasticsearch/index/analysis/SimpleIcuCollationTokenFilterTests.java +++ b/src/test/java/org/elasticsearch/index/analysis/SimpleIcuCollationTokenFilterTests.java @@ -18,16 +18,16 @@ import org.elasticsearch.index.settings.IndexSettingsModule; import org.elasticsearch.indices.analysis.IndicesAnalysisModule; import org.elasticsearch.indices.analysis.IndicesAnalysisService; -import org.testng.annotations.Test; +import org.elasticsearch.test.ElasticsearchTestCase; +import org.junit.Test; import java.io.IOException; import java.io.StringReader; -import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; // Tests borrowed from Solr's Icu collation key filter factory test. -public class SimpleIcuCollationTokenFilterTests { +public class SimpleIcuCollationTokenFilterTests extends ElasticsearchTestCase { /* * Turkish has some funny casing.