lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pasha Bizhan" <lucene-l...@lucenedotnet.com>
Subject RE: Test failure question
Date Fri, 16 Jun 2006 18:07:03 GMT
Hi,

> testBarelyCloseEnough(), testExact(), testMulipleTerms(), 
> etc?  If so, then the NUnit is not doing this.  I tested by 
> outputing to stdout.

NUnit calls setUp before each test and calls tearDown after each test.
Add Console.WriteLine and see the result.

Let me show:
------------------
	[TestFixture]
	public class TestPhraseQuery 	{
		[SetUp]
		protected void SetUp() 		{
			directory = new RAMDirectory();
			IndexWriter writer = new IndexWriter(directory, new
WhitespaceAnalyzer(), true);
			...
			Console.WriteLine("set up");
		}


		[TearDown]
		protected void TearDown() 		{
			searcher.Close(); directory.Close();
			Console.WriteLine("tear down");
		}


		[Test]
		public void TestNotCloseEnough()  {
			query.SetSlop(2);
			.....
			MockAssert.AreEqual(0, hits.Length());
			Console.WriteLine("not close");
		}
------------------
The output:
---------------
set up
barely
tear down

set up
tear down
...
----------------

Pasha Bizhan


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message