Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@www.apache.org Received: (qmail 5164 invoked from network); 5 Jan 2004 15:46:29 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 5 Jan 2004 15:46:28 -0000 Received: (qmail 32434 invoked by uid 500); 5 Jan 2004 15:46:21 -0000 Delivered-To: apmail-jakarta-lucene-dev-archive@jakarta.apache.org Received: (qmail 32416 invoked by uid 500); 5 Jan 2004 15:46:21 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 32403 invoked by uid 500); 5 Jan 2004 15:46:21 -0000 Received: (qmail 32400 invoked from network); 5 Jan 2004 15:46:21 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 5 Jan 2004 15:46:21 -0000 Received: (qmail 5143 invoked by uid 1419); 5 Jan 2004 15:46:26 -0000 Date: 5 Jan 2004 15:46:26 -0000 Message-ID: <20040105154626.5142.qmail@minotaur.apache.org> From: ehatcher@apache.org To: jakarta-lucene-sandbox-cvs@apache.org Subject: cvs commit: jakarta-lucene-sandbox/contributions/ant/src/test/org/apache/lucene/ant IndexTaskTest.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 - * - *@param name Description of Parameter - */ - public IndexTaskTest(String name) { - super(name); - } - - - /** * The JUnit setup method * *@exception 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: lucene-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-dev-help@jakarta.apache.org