ehatcher 2004/01/05 07:46:26
Modified: contributions/ant/src/test/org/apache/lucene/ant
IndexTaskTest.java
Log:
test case cleanup
Revision Changes Path
1.2 +4 -20
jakarta-lucene-sandbox/contributions/ant/src/test/org/apache/lucene/ant/IndexTaskTest.java
Index: IndexTaskTest.java
===================================================================
RCS file:
/home/cvs/jakarta-lucene-sandbox/contributions/ant/src/test/org/apache/lucene/ant/IndexTaskTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- IndexTaskTest.java 11 Jul 2002 01:12:31 -0000 1.1
+++ IndexTaskTest.java 5 Jan 2004 15:46:26 -0000 1.2
@@ -8,7 +8,6 @@
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.StopAnalyzer;
-import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.search.Hits;
import org.apache.lucene.search.IndexSearcher;
@@ -30,27 +29,17 @@
private String docsDir = System.getProperty("docs.dir");
private String indexDir = System.getProperty("index.dir");
-
+
private Searcher searcher;
private Analyzer analyzer;
/**
- * Constructor for the IndexTaskTest object
- *
- [EMAIL PROTECTED] name Description of Parameter
- */
- public IndexTaskTest(String name) {
- super(name);
- }
-
-
- /**
* The JUnit setup method
*
[EMAIL PROTECTED] IOException Description of Exception
*/
- public void setUp() throws IOException {
+ public void setUp() throws Exception {
Project project = new Project();
IndexTask task = new IndexTask();
@@ -68,16 +57,11 @@
}
- /**
- * A unit test for JUnit
- */
- public void testSearch() throws IOException, ParseException {
- System.out.println("sysout");
- System.err.println("syserr");
+ public void testSearch() throws Exception {
Query query = QueryParser.parse("test", "contents", analyzer);
Hits hits = searcher.search(query);
-
+
assertEquals("Find document(s)", 2, hits.length());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]