lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r411501 [30/30] - in /incubator/lucene.net/trunk/C#/src: ./ Demo/DeleteFiles/ Demo/DemoLib/ Demo/DemoLib/HTML/ Demo/IndexFiles/ Demo/IndexHtml/ Demo/SearchFiles/ Lucene.Net/ Lucene.Net/Analysis/ Lucene.Net/Analysis/Standard/ Lucene.Net/Docu...
Date Sun, 04 Jun 2006 02:41:25 GMT
Modified: incubator/lucene.net/trunk/C#/src/Test/Search/TestWildcard.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Search/TestWildcard.cs?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Search/TestWildcard.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Search/TestWildcard.cs Sat Jun  3 19:41:13 2006
@@ -13,36 +13,54 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
+using NUnit.Framework;
 using SimpleAnalyzer = Lucene.Net.Analysis.SimpleAnalyzer;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using IndexWriter = Lucene.Net.Index.IndexWriter;
 using Term = Lucene.Net.Index.Term;
 using RAMDirectory = Lucene.Net.Store.RAMDirectory;
-using NUnit.Framework;
+
 namespace Lucene.Net.Search
 {
 	
-	/// <summary> TestWildcard tests the '*' and '?' wildard characters.
+	/// <summary> TestWildcard tests the '*' and '?' wildcard characters.
 	/// 
 	/// </summary>
+	/// <version>  $Id: TestWildcard.java 329860 2005-10-31 17:06:29Z bmesser $
+	/// </version>
 	/// <author>  Otis Gospodnetic
 	/// </author>
 	[TestFixture]
     public class TestWildcard
 	{
-		/// <summary> Creates a new <code>TestWildcard</code> instance.
-		/// 
-		/// </summary>
-		/// <param name="name">the name of the test
-		/// </param>
+		[Test]
+        public virtual void  TestEquals()
+		{
+			WildcardQuery wq1 = new WildcardQuery(new Term("field", "b*a"));
+			WildcardQuery wq2 = new WildcardQuery(new Term("field", "b*a"));
+			WildcardQuery wq3 = new WildcardQuery(new Term("field", "b*a"));
+			
+			// reflexive?
+			Assert.AreEqual(wq1, wq2);
+			Assert.AreEqual(wq2, wq1);
+			
+			// transitive?
+			Assert.AreEqual(wq2, wq3);
+			Assert.AreEqual(wq1, wq3);
+			
+			Assert.IsFalse(wq1.Equals(null));
+			
+			FuzzyQuery fq = new FuzzyQuery(new Term("field", "b*a"));
+			Assert.IsFalse(wq1.Equals(fq));
+			Assert.IsFalse(fq.Equals(wq1));
+		}
 		
-		/// <summary> Tests Wildcard queries with an asterisk.
-		/// 
-		/// </summary>
+		/// <summary> Tests Wildcard queries with an asterisk.</summary>
 		[Test]
-		public virtual void  TestAsterisk()
+        public virtual void  TestAsterisk()
 		{
 			RAMDirectory indexStore = GetIndexStore("body", new System.String[]{"metal", "metals"});
 			IndexSearcher searcher = new IndexSearcher(indexStore);
@@ -53,11 +71,11 @@
 			Query query5 = new WildcardQuery(new Term("body", "m*tals"));
 			
 			BooleanQuery query6 = new BooleanQuery();
-			query6.Add(query5, false, false);
+			query6.Add(query5, BooleanClause.Occur.SHOULD);
 			
 			BooleanQuery query7 = new BooleanQuery();
-			query7.Add(query3, false, false);
-			query7.Add(query5, false, false);
+			query7.Add(query3, BooleanClause.Occur.SHOULD);
+			query7.Add(query5, BooleanClause.Occur.SHOULD);
 			
 			// Queries do not automatically lower-case search terms:
 			Query query8 = new WildcardQuery(new Term("body", "M*tal*"));
@@ -70,13 +88,15 @@
 			AssertMatches(searcher, query6, 1);
 			AssertMatches(searcher, query7, 2);
 			AssertMatches(searcher, query8, 0);
+			AssertMatches(searcher, new WildcardQuery(new Term("body", "*tall")), 0);
+			AssertMatches(searcher, new WildcardQuery(new Term("body", "*tal")), 1);
+			AssertMatches(searcher, new WildcardQuery(new Term("body", "*tal*")), 2);
 		}
 		
 		/// <summary> Tests Wildcard queries with a question mark.
 		/// 
 		/// </summary>
-		/// <exception cref=""> IOException if an error occurs
-		/// </exception>
+		/// <throws>  IOException if an error occurs </throws>
 		[Test]
         public virtual void  TestQuestionmark()
 		{
@@ -87,12 +107,14 @@
 			Query query3 = new WildcardQuery(new Term("body", "metals?"));
 			Query query4 = new WildcardQuery(new Term("body", "m?t?ls"));
 			Query query5 = new WildcardQuery(new Term("body", "M?t?ls"));
+			Query query6 = new WildcardQuery(new Term("body", "meta??"));
 			
 			AssertMatches(searcher, query1, 1);
-			AssertMatches(searcher, query2, 2);
-			AssertMatches(searcher, query3, 1);
+			AssertMatches(searcher, query2, 1);
+			AssertMatches(searcher, query3, 0);
 			AssertMatches(searcher, query4, 3);
 			AssertMatches(searcher, query5, 0);
+			AssertMatches(searcher, query6, 1); // Query: 'meta??' matches 'metals' not 'metal'
 		}
 		
 		private RAMDirectory GetIndexStore(System.String field, System.String[] contents)
@@ -101,8 +123,8 @@
 			IndexWriter writer = new IndexWriter(indexStore, new SimpleAnalyzer(), true);
 			for (int i = 0; i < contents.Length; ++i)
 			{
-				Document doc = new Document();
-				doc.Add(Field.Text(field, contents[i]));
+				Lucene.Net.Documents.Document doc = new Lucene.Net.Documents.Document();
+				doc.Add(new Field(field, contents[i], Field.Store.YES, Field.Index.TOKENIZED));
 				writer.AddDocument(doc);
 			}
 			writer.Optimize();

Modified: incubator/lucene.net/trunk/C#/src/Test/SearchTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/SearchTest.cs?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/SearchTest.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/SearchTest.cs Sat Jun  3 19:41:13 2006
@@ -13,14 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
 using Lucene.Net.Analysis;
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
-using Lucene.Net.QueryParser;
+using Lucene.Net.QueryParsers;
 using Lucene.Net.Search;
 using Searchable = Lucene.Net.Search.Searchable;
 using Lucene.Net.Store;
+
 namespace Lucene.Net
 {
 	
@@ -38,8 +40,8 @@
 				System.String[] docs = new System.String[]{"a b c d e", "a b c d e a b c d e", "a b c d e f g h i j", "a c e", "e c a", "a c e a c e", "a c e a b c"};
 				for (int j = 0; j < docs.Length; j++)
 				{
-					Document d = new Document();
-					d.Add(Field.Text("contents", docs[j]));
+					Lucene.Net.Documents.Document d = new Lucene.Net.Documents.Document();
+					d.Add(new Field("contents", docs[j], Field.Store.YES, Field.Index.TOKENIZED));
 					writer.AddDocument(d);
 				}
 				writer.Close();
@@ -49,7 +51,7 @@
 				System.String[] queries = new System.String[]{"\"a c e\""};
 				Hits hits = null;
 				
-				QueryParsers.QueryParser parser = new QueryParsers.QueryParser("contents", analyzer);
+				Lucene.Net.QueryParsers.QueryParser parser = new Lucene.Net.QueryParsers.QueryParser("contents", analyzer);
 				parser.SetPhraseSlop(4);
 				for (int j = 0; j < queries.Length; j++)
 				{
@@ -66,7 +68,7 @@
 					System.Console.Out.WriteLine(hits.Length() + " total results");
 					for (int i = 0; i < hits.Length() && i < 10; i++)
 					{
-						Document d = hits.Doc(i);
+						Lucene.Net.Documents.Document d = hits.Doc(i);
 						System.Console.Out.WriteLine(i + " " + hits.Score(i) + " " + d.Get("contents"));
 					}
 				}
@@ -80,14 +82,8 @@
 		
 		internal static long Time(int year, int month, int day)
 		{
-            // {{Aroush
-            System.DateTime tempDate = System.DateTime.Now;
-			System.Globalization.GregorianCalendar calendar = new System.Globalization.GregorianCalendar();
-            //tempDate.Year = year;
-            //tempDate.Month = month;
-            //tempDate.Day = day;
-            return tempDate.Ticks;
-            // Aroush}}
-        }
+            System.DateTime calendar = new System.DateTime(year, month, day, 0, 0, 0, 0, new System.Globalization.GregorianCalendar());
+            return calendar.Ticks;
+		}
 	}
 }

Modified: incubator/lucene.net/trunk/C#/src/Test/SearchTestForDuplicates.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/SearchTestForDuplicates.cs?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/SearchTestForDuplicates.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/SearchTestForDuplicates.cs Sat Jun  3 19:41:13 2006
@@ -13,14 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
 using Lucene.Net.Analysis;
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
-using Lucene.Net.QueryParser;
+using Lucene.Net.QueryParsers;
 using Lucene.Net.Search;
 using Searchable = Lucene.Net.Search.Searchable;
 using Lucene.Net.Store;
+
 namespace Lucene.Net
 {
 	
@@ -46,9 +48,9 @@
 				
 				for (int j = 0; j < MAX_DOCS; j++)
 				{
-					Document d = new Document();
-					d.Add(Field.Text(PRIORITY_FIELD, HIGH_PRIORITY));
-					d.Add(Field.Text(ID_FIELD, System.Convert.ToString(j)));
+					Lucene.Net.Documents.Document d = new Lucene.Net.Documents.Document();
+					d.Add(new Field(PRIORITY_FIELD, HIGH_PRIORITY, Field.Store.YES, Field.Index.TOKENIZED));
+					d.Add(new Field(ID_FIELD, System.Convert.ToString(j), Field.Store.YES, Field.Index.TOKENIZED));
 					writer.AddDocument(d);
 				}
 				writer.Close();
@@ -57,7 +59,7 @@
 				Searcher searcher = new IndexSearcher(directory);
 				Hits hits = null;
 				
-				QueryParsers.QueryParser parser = new QueryParsers.QueryParser(PRIORITY_FIELD, analyzer);
+				Lucene.Net.QueryParsers.QueryParser parser = new Lucene.Net.QueryParsers.QueryParser(PRIORITY_FIELD, analyzer);
 				
 				Query query = parser.Parse(HIGH_PRIORITY);
 				System.Console.Out.WriteLine("Query: " + query.ToString(PRIORITY_FIELD));
@@ -71,7 +73,7 @@
 				searcher = new IndexSearcher(directory);
 				hits = null;
 				
-				parser = new QueryParsers.QueryParser(PRIORITY_FIELD, analyzer);
+				parser = new Lucene.Net.QueryParsers.QueryParser(PRIORITY_FIELD, analyzer);
 				
 				query = parser.Parse(HIGH_PRIORITY + " OR " + MED_PRIORITY);
 				System.Console.Out.WriteLine("Query: " + query.ToString(PRIORITY_FIELD));
@@ -94,7 +96,7 @@
 			{
 				if (i < 10 || (i > 94 && i < 105))
 				{
-					Document d = hits.Doc(i);
+					Lucene.Net.Documents.Document d = hits.Doc(i);
 					System.Console.Out.WriteLine(i + " " + d.Get(ID_FIELD));
 				}
 			}

Modified: incubator/lucene.net/trunk/C#/src/Test/Store/_TestHelper.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Store/_TestHelper.cs?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Store/_TestHelper.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Store/_TestHelper.cs Sat Jun  3 19:41:13 2006
@@ -13,32 +13,34 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
+
 namespace Lucene.Net.Store
 {
 	
 	/// <summary>This class provides access to package-level features defined in the
 	/// store package. It is used for testing only.
 	/// </summary>
-	public class TestHelper
+	public class _TestHelper
 	{
 		
 		/// <summary>Returns true if the instance of the provided input stream is actually
-		/// an FSInputStream.
+		/// an FSIndexInput.
 		/// </summary>
-		public static bool isFSInputStream(InputStream is_Renamed)
+		public static bool IsFSIndexInput(IndexInput is_Renamed)
 		{
-			return is_Renamed is FSInputStream;
+			return is_Renamed is FSIndexInput;
 		}
 		
-		/// <summary>Returns true if the provided input stream is an FSInputStream and
+		/// <summary>Returns true if the provided input stream is an FSIndexInput and
 		/// is a clone, that is it does not own its underlying file descriptor.
 		/// </summary>
-		public static bool IsFSInputStreamClone(InputStream is_Renamed)
+		public static bool IsFSIndexInputClone(IndexInput is_Renamed)
 		{
-			if (isFSInputStream(is_Renamed))
+			if (IsFSIndexInput(is_Renamed))
 			{
-				return ((FSInputStream) is_Renamed).isClone;
+				return ((FSIndexInput) is_Renamed).IsClone;
 			}
 			else
 			{
@@ -46,18 +48,18 @@
 			}
 		}
 		
-		/// <summary>Given an instance of FSDirectory.FSInputStream, this method returns
+		/// <summary>Given an instance of FSDirectory.FSIndexInput, this method returns
 		/// true if the underlying file descriptor is valid, and false otherwise.
 		/// This can be used to determine if the OS file has been closed.
 		/// The descriptor becomes invalid when the non-clone instance of the
-		/// FSInputStream that owns this descriptor is closed. However, the
+		/// FSIndexInput that owns this descriptor is closed. However, the
 		/// descriptor may possibly become invalid in other ways as well.
 		/// </summary>
-		public static bool IsFSInputStreamOpen(InputStream is_Renamed)
+		public static bool IsFSIndexInputOpen(IndexInput is_Renamed)
 		{
-			if (isFSInputStream(is_Renamed))
+			if (IsFSIndexInput(is_Renamed))
 			{
-				FSInputStream fis = (FSInputStream) is_Renamed;
+				FSIndexInput fis = (FSIndexInput) is_Renamed;
 				return fis.IsFDValid();
 			}
 			else

Modified: incubator/lucene.net/trunk/C#/src/Test/StoreTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/StoreTest.cs?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/StoreTest.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/StoreTest.cs Sat Jun  3 19:41:13 2006
@@ -13,12 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
 using Directory = Lucene.Net.Store.Directory;
 using FSDirectory = Lucene.Net.Store.FSDirectory;
-using InputStream = Lucene.Net.Store.InputStream;
-using OutputStream = Lucene.Net.Store.OutputStream;
+using IndexInput = Lucene.Net.Store.IndexInput;
+using IndexOutput = Lucene.Net.Store.IndexOutput;
 using RAMDirectory = Lucene.Net.Store.RAMDirectory;
+
 namespace Lucene.Net
 {
 	
@@ -37,7 +39,7 @@
 			}
 		}
 		
-		public static void  Test(int count, bool ram)
+        public static void  Test(int count, bool ram)
 		{
 			System.Random gen = new System.Random((System.Int32) 1251971);
 			int i;
@@ -60,7 +62,7 @@
 				byte b = (byte) (gen.Next() & 0x7F);
 				//System.out.println("filling " + name + " with " + length + " of " + b);
 				
-				OutputStream file = store.CreateFile(name);
+				IndexOutput file = store.CreateOutput(name);
 				
 				for (int j = 0; j < length; j++)
 					file.WriteByte(b);
@@ -75,6 +77,7 @@
 			System.Console.Out.Write(end.Ticks - start.Ticks);
 			System.Console.Out.WriteLine(" total milliseconds to create");
 			
+			//UPGRADE_TODO: The differences in the expected value  of parameters for constructor 'java.util.Random.Random'  may cause compilation errors.  "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1092'"
 			gen = new System.Random((System.Int32) 1251971);
 			start = System.DateTime.Now;
 			
@@ -85,10 +88,10 @@
 			{
 				System.String name = i + ".dat";
 				int length = gen.Next() & LENGTH_MASK;
-				sbyte b = (sbyte) (gen.Next() & 0x7F);
+				byte b = (byte) (gen.Next() & 0x7F);
 				//System.out.println("reading " + name + " with " + length + " of " + b);
 				
-				InputStream file = store.OpenFile(name);
+				IndexInput file = store.OpenInput(name);
 				
 				if (file.Length() != length)
 					throw new System.Exception("length incorrect");

Modified: incubator/lucene.net/trunk/C#/src/Test/Test.csproj
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Test.csproj?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Test.csproj (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Test.csproj Sat Jun  3 19:41:13 2006
@@ -32,7 +32,7 @@
                     DocumentationFile = ""
                     DebugSymbols = "true"
                     FileAlignment = "4096"
-                    IncrementalBuild = "false"
+                    IncrementalBuild = "true"
                     NoStdLib = "false"
                     NoWarn = ""
                     Optimize = "false"
@@ -123,12 +123,12 @@
                 <Reference
                     Name = "Lucene.Net"
                     AssemblyName = "Lucene.Net"
-                    HintPath = "..\bin\Debug\Lucene.Net.dll"
+                    HintPath = "..\Lucene.Net\bin\Debug\Lucene.Net.dll"
                 />
                 <Reference
                     Name = "DemoLib"
                     AssemblyName = "DemoLib"
-                    HintPath = "..\bin\Debug\DemoLib.dll"
+                    HintPath = "..\Demo\DemoLib\bin\Debug\DemoLib.dll"
                 />
             </References>
         </Build>
@@ -165,6 +165,16 @@
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "TestDemo.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "TestHitIterator.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "TestSearch.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
@@ -185,208 +195,227 @@
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\TestPerFieldAnalzyerWrapper.cs"
+                    RelPath = "Analysis\TestISOLatin1AccentFilter.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\TestStopAnalyzer.cs"
+                    RelPath = "Analysis\TestKeywordAnalyzer.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\RU\RES1251.HTM"
-                    BuildAction = "Content"
+                    RelPath = "Analysis\TestLengthFilter.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\RU\RESKOI8.HTM"
-                    BuildAction = "Content"
+                    RelPath = "Analysis\TestPerFieldAnalzyerWrapper.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\RU\RESUNICODE.HTM"
-                    BuildAction = "Content"
+                    RelPath = "Analysis\TestStandardAnalyzer.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\RU\STEMSUNICODE.TXT"
-                    BuildAction = "Content"
+                    RelPath = "Analysis\TestStopAnalyzer.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\RU\TEST1251.TXT"
-                    BuildAction = "Content"
+                    RelPath = "Analysis\TestStopFilter.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\RU\TESTKOI8.TXT"
-                    BuildAction = "Content"
+                    RelPath = "Document\TestBinaryDocument.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\RU\TestRussianAnalyzer.cs"
+                    RelPath = "Document\TestDateTools.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\RU\TestRussianStem.cs"
+                    RelPath = "Document\TestDocument.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\RU\TESTUNICODE.TXT"
-                    BuildAction = "Content"
+                    RelPath = "Document\TestNumberTools.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Analysis\RU\WORDSUNICODE.TXT"
-                    BuildAction = "Content"
+                    RelPath = "Index\DocHelper.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Data\AnalysisTestWords.txt"
-                    BuildAction = "Content"
+                    RelPath = "Index\MockIndexInput.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Data\stemsUnicode.txt"
-                    BuildAction = "Content"
+                    RelPath = "Index\TestCompoundFile.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Data\test.txt"
-                    BuildAction = "Content"
+                    RelPath = "Index\TestDoc.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Data\test2.txt"
-                    BuildAction = "Content"
+                    RelPath = "Index\TestDocumentWriter.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Data\Words.txt"
-                    BuildAction = "Content"
+                    RelPath = "Index\TestFieldInfos.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Data\wordsUnicode.txt"
-                    BuildAction = "Content"
+                    RelPath = "Index\TestFieldsReader.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Document\TestDocument.cs"
+                    RelPath = "Index\TestFilterIndexReader.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\DocHelper.cs"
+                    RelPath = "Index\TestIndexInput.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\DocTest.cs"
+                    RelPath = "Index\TestIndexModifier.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\MockInputStream.cs"
+                    RelPath = "Index\TestIndexReader.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TermInfosTest.cs"
+                    RelPath = "Index\TestIndexWriter.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestCompoundFile.cs"
+                    RelPath = "Index\TestMultiReader.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestDoc.cs"
+                    RelPath = "Index\TestParallelReader.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestDocumentWriter.cs"
+                    RelPath = "Index\TestSegmentMerger.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestFieldInfos.cs"
+                    RelPath = "Index\TestSegmentReader.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestFieldsReader.cs"
+                    RelPath = "Index\TestSegmentTermDocs.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestFilterIndexReader.cs"
+                    RelPath = "Index\TestSegmentTermEnum.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestIndexReader.cs"
+                    RelPath = "Index\TestTermVectorsReader.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestIndexWriter.cs"
+                    RelPath = "Index\TestTermVectorsWriter.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestInputStream.cs"
+                    RelPath = "Index\TestWordlistLoader.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestMultiReader.cs"
+                    RelPath = "Index\Store\TestFSDirectory.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestSegmentMerger.cs"
+                    RelPath = "Index\Store\TestRAMDirectory.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestSegmentReader.cs"
+                    RelPath = "QueryParser\TestMultiAnalyzer.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestSegmentTermDocs.cs"
+                    RelPath = "QueryParser\TestMultiFieldQueryParser.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestSegmentTermEnum.cs"
+                    RelPath = "QueryParser\TestQueryParser.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestTermVectorsReader.cs"
+                    RelPath = "Search\BaseTestRangeFilter.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\TestTermVectorsWriter.cs"
+                    RelPath = "Search\CheckHits.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Index\Store\FSDirectoryTestCase.cs"
+                    RelPath = "Search\MockFilter.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "QueryParser\TestQueryParser.cs"
+                    RelPath = "Search\QueryUtils.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Search\CheckHits.cs"
+                    RelPath = "Search\SampleComparable.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Search\MockFilter.cs"
+                    RelPath = "Search\TestBoolean2.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Search\SampleComparable.cs"
+                    RelPath = "Search\TestBooleanMinShouldMatch.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Search\TestBooleanOr.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
@@ -396,16 +425,41 @@
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "Search\TestBooleanQuery.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Search\TestBooleanScorer.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "Search\TestCachingWrapperFilter.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "Search\TestConstantScoreRangeQuery.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Search\TestCustomSearcherSort.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "Search\TestDateFilter.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "Search\TestDisjunctionMaxQuery.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "Search\TestDocBoost.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
@@ -416,11 +470,36 @@
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "Search\TestFuzzyQuery.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Search\TestMatchAllDocsQuery.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Search\TestMultiPhraseQuery.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "Search\TestMultiSearcher.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "Search\TestMultiSearcherRanking.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Search\TestMultiThreadTermVectors.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "Search\TestNot.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
@@ -456,6 +535,11 @@
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "Search\TestRangeFilter.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "Search\TestRangeQuery.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
@@ -491,6 +575,16 @@
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "Search\Regex\TestRegexQuery.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Search\Regex\TestSpanRegexQuery.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "Search\Spans\TestBasics.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
@@ -501,17 +595,22 @@
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Store\_TestHelper.cs"
+                    RelPath = "Search\Spans\TestSpansAdvanced.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Util\English.cs"
+                    RelPath = "Search\Spans\TestSpansAdvanced2.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
-                    RelPath = "Util\StringHelperTest.cs"
+                    RelPath = "Store\_TestHelper.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Util\English.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
@@ -522,6 +621,16 @@
                 />
                 <File
                     RelPath = "Util\TestPriorityQueue.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Util\TestSmallFloat.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Util\TestStringHelper.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />

Modified: incubator/lucene.net/trunk/C#/src/Test/Test.csproj.user
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Test.csproj.user?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Test.csproj.user (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Test.csproj.user Sat Jun  3 19:41:13 2006
@@ -1,7 +1,7 @@
 <VisualStudioProject>
     <CSHARP LastOpenVersion = "7.10.3077" >
         <Build>
-            <Settings ReferencePath = "E:\Aroush.proj\Lucene.Net-1.4.alpha-006\bin\Debug\;E:\Aroush.proj\Lucene.Net-1.4.alpha-006\Demo\DemoLib\obj\Debug\;E:\Aroush.proj\Lucene.Net-1.4.alpha-004\bin\Debug\;E:\Aroush.proj\Lucene.Net-1.4.alpha-005\bin\Debug\;E:\Aroush.proj\Lucene.Net-1.4.beta-001\bin\Debug\;E:\Aroush.proj\Lucene.Net-1.4.3-beta.001\bin\Debug\;E:\Aroush.proj\Lucene.Net-1.4.3-beta.002\bin\Debug\;E:\Aroush.proj\Lucene.Net-1.4.3.RC1-001\bin\Debug\;E:\Aroush.proj\Lucene.Net-1.4.3.final-003\bin\Debug\" >
+            <Settings ReferencePath = "E:\Aroush.proj\Lucene.Net-1.9.rc1-003.src\Lucene.Net\bin\Debug\;E:\Aroush.proj\Lucene.Net-1.9.rc1-003.src\Demo\DemoLib\bin\Debug\" >
                 <Config
                     Name = "Debug"
                     EnableASPDebugging = "false"
@@ -16,7 +16,7 @@
                     StartProgram = ""
                     StartURL = ""
                     StartWorkingDirectory = ""
-                    StartWithIE = "true"
+                    StartWithIE = "false"
                 />
                 <Config
                     Name = "Release"
@@ -32,7 +32,7 @@
                     StartProgram = ""
                     StartURL = ""
                     StartWorkingDirectory = ""
-                    StartWithIE = "true"
+                    StartWithIE = "false"
                 />
             </Settings>
         </Build>

Added: incubator/lucene.net/trunk/C#/src/Test/Test.suo
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Test.suo?rev=411501&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lucene.net/trunk/C#/src/Test/Test.suo
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/lucene.net/trunk/C#/src/Test/TestDemo.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/TestDemo.cs?rev=411501&view=auto
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/TestDemo.cs (added)
+++ incubator/lucene.net/trunk/C#/src/Test/TestDemo.cs Sat Jun  3 19:41:13 2006
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Analyzer = Lucene.Net.Analysis.Analyzer;
+using StandardAnalyzer = Lucene.Net.Analysis.Standard.StandardAnalyzer;
+using Document = Lucene.Net.Documents.Document;
+using Field = Lucene.Net.Documents.Field;
+using IndexWriter = Lucene.Net.Index.IndexWriter;
+using ParseException = Lucene.Net.QueryParsers.ParseException;
+using QueryParser = Lucene.Net.QueryParsers.QueryParser;
+using Hits = Lucene.Net.Search.Hits;
+using IndexSearcher = Lucene.Net.Search.IndexSearcher;
+using Query = Lucene.Net.Search.Query;
+using Directory = Lucene.Net.Store.Directory;
+using RAMDirectory = Lucene.Net.Store.RAMDirectory;
+using NUnit.Framework;
+
+namespace Lucene.Net
+{
+	
+	/// <summary> A very simple demo used in the API documentation (src/java/overview.html).
+	/// 
+	/// </summary>
+	/// <author>  Daniel Naber
+	/// </author>
+	[TestFixture]
+    public class TestDemo
+	{
+		[Test]
+		public virtual void  TestDemo_Renamed_Method()
+		{
+			
+			Analyzer analyzer = new StandardAnalyzer();
+			
+			// Store the index in memory:
+			Directory directory = new RAMDirectory();
+			// To store an index on disk, use this instead (note that the 
+			// parameter true will overwrite the index in that directory
+			// if one exists):
+			//Directory directory = FSDirectory.getDirectory("/tmp/testindex", true);
+			IndexWriter iwriter = new IndexWriter(directory, analyzer, true);
+			iwriter.SetMaxFieldLength(25000);
+			Lucene.Net.Documents.Document doc = new Lucene.Net.Documents.Document();
+			System.String text = "This is the text to be indexed.";
+			doc.Add(new Field("fieldname", text, Field.Store.YES, Field.Index.TOKENIZED));
+			iwriter.AddDocument(doc);
+			iwriter.Close();
+			
+			// Now search the index:
+			IndexSearcher isearcher = new IndexSearcher(directory);
+			// Parse a simple query that searches for "text":
+			Query query = Lucene.Net.QueryParsers.QueryParser.Parse("text", "fieldname", analyzer);
+			Hits hits = isearcher.Search(query);
+			Assert.AreEqual(1, hits.Length());
+			// Iterate through the results:
+			for (int i = 0; i < hits.Length(); i++)
+			{
+				Lucene.Net.Documents.Document hitDoc = hits.Doc(i);
+				Assert.AreEqual("This is the text to be indexed.", hitDoc.Get("fieldname"));
+			}
+			isearcher.Close();
+			directory.Close();
+		}
+	}
+}
\ No newline at end of file

Added: incubator/lucene.net/trunk/C#/src/Test/TestHitIterator.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/TestHitIterator.cs?rev=411501&view=auto
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/TestHitIterator.cs (added)
+++ incubator/lucene.net/trunk/C#/src/Test/TestHitIterator.cs Sat Jun  3 19:41:13 2006
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using NUnit.Framework;
+using WhitespaceAnalyzer = Lucene.Net.Analysis.WhitespaceAnalyzer;
+using Document = Lucene.Net.Documents.Document;
+using Field = Lucene.Net.Documents.Field;
+using IndexWriter = Lucene.Net.Index.IndexWriter;
+using Term = Lucene.Net.Index.Term;
+using Hit = Lucene.Net.Search.Hit;
+using HitIterator = Lucene.Net.Search.HitIterator;
+using Hits = Lucene.Net.Search.Hits;
+using IndexSearcher = Lucene.Net.Search.IndexSearcher;
+using TermQuery = Lucene.Net.Search.TermQuery;
+using RAMDirectory = Lucene.Net.Store.RAMDirectory;
+
+namespace Lucene.Net
+{
+	
+	/// <summary> This test intentionally not put in the search package in order
+	/// to test HitIterator and Hit package protection.
+	/// </summary>
+	[TestFixture]
+    public class TestHitIterator
+	{
+        [Test]
+		public virtual void  TestIterator()
+		{
+			RAMDirectory directory = new RAMDirectory();
+			
+			IndexWriter writer = new IndexWriter(directory, new WhitespaceAnalyzer(), true);
+			Lucene.Net.Documents.Document doc = new Lucene.Net.Documents.Document();
+			doc.Add(new Field("field", "iterator test doc 1", Field.Store.YES, Field.Index.TOKENIZED));
+			writer.AddDocument(doc);
+			
+			doc = new Lucene.Net.Documents.Document();
+			doc.Add(new Field("field", "iterator test doc 2", Field.Store.YES, Field.Index.TOKENIZED));
+			writer.AddDocument(doc);
+			
+			writer.Close();
+			
+			IndexSearcher searcher = new IndexSearcher(directory);
+			Hits hits = searcher.Search(new TermQuery(new Term("field", "iterator")));
+			
+			HitIterator iterator = (HitIterator) hits.Iterator();
+			Assert.AreEqual(2, iterator.Length());
+			Assert.IsTrue(iterator.MoveNext());
+			Hit hit = (Hit) iterator.Current;
+			Assert.AreEqual("iterator test doc 1", hit.Get("field"));
+			
+			Assert.IsTrue(iterator.MoveNext());
+			hit = (Hit) iterator.Current;
+			Assert.AreEqual("iterator test doc 2", hit.GetDocument().Get("field"));
+			
+			Assert.IsFalse(iterator.MoveNext());
+			
+			bool caughtException = false;
+			try
+			{
+				System.Object generatedAux = iterator.Current;
+			}
+			catch (System.ArgumentOutOfRangeException e)
+			{
+				Assert.IsTrue(true);
+				caughtException = true;
+			}
+			
+			Assert.IsTrue(caughtException);
+		}
+	}
+}
\ No newline at end of file

Modified: incubator/lucene.net/trunk/C#/src/Test/TestSearch.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/TestSearch.cs?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/TestSearch.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/TestSearch.cs Sat Jun  3 19:41:13 2006
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
 using NUnit.Framework;
 using Lucene.Net.Analysis;
@@ -22,13 +23,14 @@
 using Lucene.Net.Search;
 using Searchable = Lucene.Net.Search.Searchable;
 using Lucene.Net.Store;
+
 namespace Lucene.Net
 {
 	
 	/// <summary>JUnit adaptation of an older test case SearchTest.</summary>
 	/// <author>  dmitrys@earthlink.net
 	/// </author>
-	/// <version>  $Id: TestSearch.java,v 1.3 2004/03/29 22:48:05 cutting Exp $
+	/// <version>  $Id: TestSearch.java 150494 2004-09-06 22:29:22Z dnaber $
 	/// </version>
 	[TestFixture]
     public class TestSearch
@@ -38,6 +40,7 @@
 		[STAThread]
 		public static void  Main(System.String[] args)
 		{
+			// NUnit.Core.TestRunner.Run(new NUnit.Core.TestSuite(typeof(TestSearch))); // {{Aroush}} where is 'TestRunner' in NUnit?
 		}
 		
 		/// <summary>This test performs a number of searches. It also compares output
@@ -50,16 +53,20 @@
 		/// single-file formats, even if the results are wrong.
 		/// </summary>
 		[Test]
-		public virtual void  TestSearch_()
+        public virtual void  TestSearch_Renamed_Method()
 		{
 			System.IO.StringWriter sw = new System.IO.StringWriter();
-			DoTestSearch(sw, false);
+			System.IO.StreamWriter pw = null; // new System.IO.StreamWriter(sw);    // {{Aroush}} how do you pass 'sw' to StreamWriter()?
+			DoTestSearch(pw, false);
+			pw.Close();
 			sw.Close();
 			System.String multiFileOutput = sw.GetStringBuilder().ToString();
 			//System.out.println(multiFileOutput);
 			
 			sw = new System.IO.StringWriter();
-			DoTestSearch(sw, true);
+			pw = null; // new System.IO.StreamWriter(sw);   // {{Aroush}} how do you pass 'sw' to StreamWriter()?
+			DoTestSearch(pw, true);
+			pw.Close();
 			sw.Close();
 			System.String singleFileOutput = sw.GetStringBuilder().ToString();
 			
@@ -67,7 +74,7 @@
 		}
 		
 		
-		private void  DoTestSearch(System.IO.StringWriter out_Renamed, bool useCompoundFile)
+		private void  DoTestSearch(System.IO.StreamWriter out_Renamed, bool useCompoundFile)
 		{
 			Directory directory = new RAMDirectory();
 			Analyzer analyzer = new SimpleAnalyzer();
@@ -78,8 +85,8 @@
 			System.String[] docs = new System.String[]{"a b c d e", "a b c d e a b c d e", "a b c d e f g h i j", "a c e", "e c a", "a c e a c e", "a c e a b c"};
 			for (int j = 0; j < docs.Length; j++)
 			{
-				Document d = new Document();
-				d.Add(Field.Text("contents", docs[j]));
+				Lucene.Net.Documents.Document d = new Lucene.Net.Documents.Document();
+				d.Add(new Field("contents", docs[j], Field.Store.YES, Field.Index.TOKENIZED));
 				writer.AddDocument(d);
 			}
 			writer.Close();
@@ -89,7 +96,7 @@
 			System.String[] queries = new System.String[]{"a b", "\"a b\"", "\"a b c\"", "a c", "\"a c\"", "\"a c e\""};
 			Hits hits = null;
 			
-			QueryParsers.QueryParser parser = new QueryParsers.QueryParser("contents", analyzer);
+			Lucene.Net.QueryParsers.QueryParser parser = new Lucene.Net.QueryParsers.QueryParser("contents", analyzer);
 			parser.SetPhraseSlop(4);
 			for (int j = 0; j < queries.Length; j++)
 			{
@@ -106,7 +113,7 @@
 				out_Renamed.WriteLine(hits.Length() + " total results");
 				for (int i = 0; i < hits.Length() && i < 10; i++)
 				{
-					Document d = hits.Doc(i);
+					Lucene.Net.Documents.Document d = hits.Doc(i);
 					out_Renamed.WriteLine(i + " " + hits.Score(i) + " " + d.Get("contents"));
 				}
 			}
@@ -115,16 +122,8 @@
 		
 		internal static long Time(int year, int month, int day)
 		{
-            // {{Aroush
-			//// System.Globalization.GregorianCalendar calendar = new System.Globalization.GregorianCalendar();
-			//// return SupportClass.CalendarManager.manager.GetDateTime(calendar).Ticks;
-            System.DateTime tempDate = System.DateTime.Now;
-            System.Globalization.GregorianCalendar calendar = new System.Globalization.GregorianCalendar();
-            //tempDate.Year = year;
-            //tempDate.Month = month;
-            //tempDate.Day = day;
-            return tempDate.Ticks;
-            // Aroush}}
-        }
+            System.DateTime calendar = new System.DateTime(year, month, day, 0, 0, 0, 0, new System.Globalization.GregorianCalendar());
+            return calendar.Ticks;
+		}
 	}
 }

Modified: incubator/lucene.net/trunk/C#/src/Test/TestSearchForDuplicates.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/TestSearchForDuplicates.cs?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/TestSearchForDuplicates.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/TestSearchForDuplicates.cs Sat Jun  3 19:41:13 2006
@@ -13,15 +13,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
 using Lucene.Net.Analysis;
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
-using Lucene.Net.QueryParser;
+using Lucene.Net.QueryParsers;
 using Lucene.Net.Search;
 using Searchable = Lucene.Net.Search.Searchable;
 using Lucene.Net.Store;
 using NUnit.Framework;
+
 namespace Lucene.Net
 {
 	
@@ -29,7 +31,7 @@
 	/// <summary>JUnit adaptation of an older test case DocTest.</summary>
 	/// <author>  dmitrys@earthlink.net
 	/// </author>
-	/// <version>  $Id: TestSearchForDuplicates.java,v 1.3 2004/03/29 22:48:05 cutting Exp $
+	/// <version>  $Id: TestSearchForDuplicates.java 150494 2004-09-06 22:29:22Z dnaber $
 	/// </version>
 	[TestFixture]
     public class TestSearchForDuplicates
@@ -39,9 +41,11 @@
 		[STAThread]
 		public static void  Main(System.String[] args)
 		{
+			// NUnit.Core.TestRunner.Run(new NUnit.Core.TestSuite(typeof(TestSearchForDuplicates)));    // {{Aroush}} where is 'TestRunner' in NUnit
 		}
 		
 		
+		
 		internal const System.String PRIORITY_FIELD = "priority";
 		internal const System.String ID_FIELD = "id";
 		internal const System.String HIGH_PRIORITY = "high";
@@ -58,16 +62,20 @@
 		/// validate this output and make any changes to the checkHits method.
 		/// </summary>
 		[Test]
-		public virtual void  TestRun()
+        public virtual void  TestRun()
 		{
 			System.IO.StringWriter sw = new System.IO.StringWriter();
-			DoTest(sw, false);
+			System.IO.StreamWriter pw = null; // new System.IO.StreamWriter(sw);    // {{Aroush}} how do we pass 'sw' to StreamWriter?
+			DoTest(pw, false);
+			pw.Close();
 			sw.Close();
 			System.String multiFileOutput = sw.GetStringBuilder().ToString();
 			//System.out.println(multiFileOutput);
 			
 			sw = new System.IO.StringWriter();
-			DoTest(sw, true);
+			pw = null; // new System.IO.StreamWriter(sw);   // {{Aroush}} how do we pass 'sw' to StreamWriter?
+			DoTest(pw, true);
+			pw.Close();
 			sw.Close();
 			System.String singleFileOutput = sw.GetStringBuilder().ToString();
 			
@@ -75,7 +83,7 @@
 		}
 		
 		
-		private void  DoTest(System.IO.StringWriter out_Renamed, bool useCompoundFiles)
+		private void  DoTest(System.IO.StreamWriter out_Renamed, bool useCompoundFiles)
 		{
 			Directory directory = new RAMDirectory();
 			Analyzer analyzer = new SimpleAnalyzer();
@@ -83,13 +91,14 @@
 			
 			writer.SetUseCompoundFile(useCompoundFiles);
 			
+			//UPGRADE_NOTE: Final was removed from the declaration of 'MAX_DOCS '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
 			int MAX_DOCS = 225;
 			
 			for (int j = 0; j < MAX_DOCS; j++)
 			{
-				Document d = new Document();
-				d.Add(Field.Text(PRIORITY_FIELD, HIGH_PRIORITY));
-				d.Add(Field.Text(ID_FIELD, System.Convert.ToString(j)));
+				Lucene.Net.Documents.Document d = new Lucene.Net.Documents.Document();
+				d.Add(new Field(PRIORITY_FIELD, HIGH_PRIORITY, Field.Store.YES, Field.Index.TOKENIZED));
+				d.Add(new Field(ID_FIELD, System.Convert.ToString(j), Field.Store.YES, Field.Index.TOKENIZED));
 				writer.AddDocument(d);
 			}
 			writer.Close();
@@ -98,9 +107,10 @@
 			Searcher searcher = new IndexSearcher(directory);
 			Hits hits = null;
 			
-			QueryParsers.QueryParser parser = new QueryParsers.QueryParser(PRIORITY_FIELD, analyzer);
+			Lucene.Net.QueryParsers.QueryParser parser = new Lucene.Net.QueryParsers.QueryParser(PRIORITY_FIELD, analyzer);
 			
 			Query query = parser.Parse(HIGH_PRIORITY);
+			//UPGRADE_TODO: Method 'java.io.PrintWriter.println' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioPrintWriterprintln_javalangString'"
 			out_Renamed.WriteLine("Query: " + query.ToString(PRIORITY_FIELD));
 			
 			hits = searcher.Search(query);
@@ -113,9 +123,10 @@
 			searcher = new IndexSearcher(directory);
 			hits = null;
 			
-			parser = new QueryParsers.QueryParser(PRIORITY_FIELD, analyzer);
+			parser = new Lucene.Net.QueryParsers.QueryParser(PRIORITY_FIELD, analyzer);
 			
 			query = parser.Parse(HIGH_PRIORITY + " OR " + MED_PRIORITY);
+			//UPGRADE_TODO: Method 'java.io.PrintWriter.println' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioPrintWriterprintln_javalangString'"
 			out_Renamed.WriteLine("Query: " + query.ToString(PRIORITY_FIELD));
 			
 			hits = searcher.Search(query);
@@ -126,14 +137,16 @@
 		}
 		
 		
-		private void  PrintHits(System.IO.StringWriter out_Renamed, Hits hits)
+		private void  PrintHits(System.IO.StreamWriter out_Renamed, Hits hits)
 		{
+			//UPGRADE_TODO: Method 'java.io.PrintWriter.println' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioPrintWriterprintln_javalangString'"
 			out_Renamed.WriteLine(hits.Length() + " total results\n");
 			for (int i = 0; i < hits.Length(); i++)
 			{
 				if (i < 10 || (i > 94 && i < 105))
 				{
-					Document d = hits.Doc(i);
+					Lucene.Net.Documents.Document d = hits.Doc(i);
+					//UPGRADE_TODO: Method 'java.io.PrintWriter.println' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioPrintWriterprintln_javalangString'"
 					out_Renamed.WriteLine(i + " " + d.Get(ID_FIELD));
 				}
 			}
@@ -146,8 +159,8 @@
 			{
 				if (i < 10 || (i > 94 && i < 105))
 				{
-					Document d = hits.Doc(i);
-					Assert.AreEqual(System.Convert.ToString(i), d.Get(ID_FIELD), "check " + i);
+					Lucene.Net.Documents.Document d = hits.Doc(i);
+					Assert.AreEqual("check " + i, System.Convert.ToString(i), d.Get(ID_FIELD));
 				}
 			}
 		}

Modified: incubator/lucene.net/trunk/C#/src/Test/ThreadSafetyTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/ThreadSafetyTest.cs?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/ThreadSafetyTest.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/ThreadSafetyTest.cs Sat Jun  3 19:41:13 2006
@@ -13,15 +13,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
 using Lucene.Net.Analysis;
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
-using Lucene.Net.QueryParser;
+using Lucene.Net.QueryParsers;
 using Lucene.Net.Search;
 using Searchable = Lucene.Net.Search.Searchable;
 using Lucene.Net.Store;
 using Lucene.Net.Util;
+
 namespace Lucene.Net
 {
 	
@@ -33,7 +35,7 @@
 		
 		private static int ITERATIONS = 1;
 		
-		private static int random(int i)
+		private static int Random(int i)
 		{
 			// for JDK 1.1 compatibility
 			int r = RANDOM.Next();
@@ -42,11 +44,11 @@
 			return r % i;
 		}
 		
-		private class IndexerThread : SupportClass.ThreadClass
+		private class IndexerThread:SupportClass.ThreadClass
 		{
 			private void  InitBlock()
 			{
-				reopenInterval = 30 + Lucene.Net.ThreadSafetyTest.random(60);
+				reopenInterval = 30 + Lucene.Net.ThreadSafetyTest.Random(60);
 			}
 			private int reopenInterval;
 			internal IndexWriter writer;
@@ -64,10 +66,10 @@
 					
 					for (int i = 0; i < 1024 * Lucene.Net.ThreadSafetyTest.ITERATIONS; i++)
 					{
-						Document d = new Document();
+						Lucene.Net.Documents.Document d = new Lucene.Net.Documents.Document();
 						int n = Lucene.Net.ThreadSafetyTest.RANDOM.Next();
-						d.Add(Field.Keyword("id", System.Convert.ToString(n)));
-						d.Add(Field.UnStored("contents", English.IntToEnglish(n)));
+						d.Add(new Field("id", System.Convert.ToString(n), Field.Store.YES, Field.Index.UN_TOKENIZED));
+						d.Add(new Field("contents", English.IntToEnglish(n), Field.Store.NO, Field.Index.TOKENIZED));
 						System.Console.Out.WriteLine("Adding " + n);
 						
 						// Switch between single and multiple file segments
@@ -94,11 +96,11 @@
 			}
 		}
 		
-		private class SearcherThread : SupportClass.ThreadClass
+		private class SearcherThread:SupportClass.ThreadClass
 		{
 			private void  InitBlock()
 			{
-				reopenInterval = 10 + Lucene.Net.ThreadSafetyTest.random(20);
+				reopenInterval = 10 + Lucene.Net.ThreadSafetyTest.Random(20);
 			}
 			private IndexSearcher searcher;
 			private int reopenInterval;
@@ -115,7 +117,7 @@
 				{
 					for (int i = 0; i < 512 * Lucene.Net.ThreadSafetyTest.ITERATIONS; i++)
 					{
-						SearchFor(Lucene.Net.ThreadSafetyTest.RANDOM.Next(), (searcher == null)?Lucene.Net.ThreadSafetyTest.SEARCHER:searcher);
+						searchFor(Lucene.Net.ThreadSafetyTest.RANDOM.Next(), (searcher == null)?Lucene.Net.ThreadSafetyTest.SEARCHER:searcher);
 						if (i % reopenInterval == 0)
 						{
 							if (searcher == null)
@@ -138,10 +140,10 @@
 				}
 			}
 			
-			private void  SearchFor(int n, Searcher searcher)
+			private void  searchFor(int n, Searcher searcher)
 			{
 				System.Console.Out.WriteLine("Searching for " + n);
-				Hits hits = searcher.Search(QueryParsers.QueryParser.Parse(English.IntToEnglish(n), "contents", Lucene.Net.ThreadSafetyTest.ANALYZER));
+				Hits hits = searcher.Search(Lucene.Net.QueryParsers.QueryParser.Parse(English.IntToEnglish(n), "contents", Lucene.Net.ThreadSafetyTest.ANALYZER));
 				System.Console.Out.WriteLine("Search for " + n + ": total=" + hits.Length());
 				for (int j = 0; j < System.Math.Min(3, hits.Length()); j++)
 				{

Modified: incubator/lucene.net/trunk/C#/src/Test/Util/English.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Util/English.cs?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Util/English.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Util/English.cs Sat Jun  3 19:41:13 2006
@@ -13,9 +13,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
+
 namespace Lucene.Net.Util
 {
+	
 	
 	public class English
 	{

Modified: incubator/lucene.net/trunk/C#/src/Test/Util/TestBitVector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Util/TestBitVector.cs?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Util/TestBitVector.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Util/TestBitVector.cs Sat Jun  3 19:41:13 2006
@@ -13,10 +13,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
 using NUnit.Framework;
 using Directory = Lucene.Net.Store.Directory;
 using RAMDirectory = Lucene.Net.Store.RAMDirectory;
+
 namespace Lucene.Net.Util
 {
 	
@@ -25,11 +27,12 @@
 	/// </summary>
 	/// <author>  "Peter Mularien" <pmularien@deploy.com>
 	/// </author>
-	/// <version>  $Id: TestBitVector.java,v 1.3 2004/03/29 22:48:07 cutting Exp $
+	/// <version>  $Id: TestBitVector.java 150259 2004-03-29 22:48:07Z cutting $
 	/// </version>
 	[TestFixture]
     public class TestBitVector
 	{
+		
 		/// <summary> Test the default constructor on BitVectors of various sizes.</summary>
 		/// <throws>  Exception </throws>
 		[Test]

Modified: incubator/lucene.net/trunk/C#/src/Test/Util/TestPriorityQueue.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Util/TestPriorityQueue.cs?rev=411501&r1=411500&r2=411501&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Util/TestPriorityQueue.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Util/TestPriorityQueue.cs Sat Jun  3 19:41:13 2006
@@ -13,20 +13,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
 using NUnit.Framework;
+
 namespace Lucene.Net.Util
 {
 	[TestFixture]
 	public class TestPriorityQueue
 	{
+		
 		private class IntegerQueue : PriorityQueue
 		{
-			public IntegerQueue(int count) : base()
+			public IntegerQueue(int count):base()
 			{
 				Initialize(count);
 			}
 			
+			//UPGRADE_NOTE: Access modifiers of method 'LessThan' were changed to 'public'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1204'"
 			public override bool LessThan(System.Object a, System.Object b)
 			{
 				return ((System.Int32) a) < ((System.Int32) b);
@@ -36,19 +40,18 @@
 		[Test]
         public virtual void  TestPQ()
 		{
-			_TestPQ(10000);
+			_TestPQ2(10000);
 		}
 		
-        public static void  _TestPQ(int count)
+        public static void  _TestPQ2(int count)
 		{
 			PriorityQueue pq = new IntegerQueue(count);
 			System.Random gen = new System.Random();
 			int sum = 0, sum2 = 0;
 			
-			System.DateTime start = System.DateTime.Now;
-			
 			for (int i = 0; i < count; i++)
 			{
+				//UPGRADE_TODO: Method 'java.util.Random.nextInt' was converted to 'System.Random.Next' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
 				int next = gen.Next();
 				sum += next;
 				pq.Put((System.Object) next);
@@ -77,8 +80,8 @@
 			//      System.out.println(" microseconds/pop");
 		}
 		
-        [Test]
-		public virtual void  TestClear()
+		[Test]
+        public virtual void  TestClear()
 		{
 			PriorityQueue pq = new IntegerQueue(3);
 			pq.Put((System.Object) 2);
@@ -89,8 +92,8 @@
 			Assert.AreEqual(0, pq.Size());
 		}
 		
-        [Test]
-		public virtual void  TestFixedSize()
+		[Test]
+        public virtual void  TestFixedSize()
 		{
 			PriorityQueue pq = new IntegerQueue(3);
 			pq.Insert((System.Object) 2);

Added: incubator/lucene.net/trunk/C#/src/Test/Util/TestSmallFloat.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Util/TestSmallFloat.cs?rev=411501&view=auto
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Util/TestSmallFloat.cs (added)
+++ incubator/lucene.net/trunk/C#/src/Test/Util/TestSmallFloat.cs Sat Jun  3 19:41:13 2006
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2005 The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using NUnit.Framework;
+
+namespace Lucene.Net.Util
+{
+	
+	/// <author>  yonik
+	/// </author>
+	/// <version>  $Id$
+	/// </version>
+	[TestFixture]
+    public class TestSmallFloat
+	{
+		
+		// original lucene byteToFloat
+		internal static float Orig_byteToFloat(byte b)
+		{
+			if (b == 0)
+			// zero is a special case
+				return 0.0f;
+			int mantissa = b & 7;
+			int exponent = (b >> 3) & 31;
+			int bits = ((exponent + (63 - 15)) << 24) | (mantissa << 21);
+			return (BitConverter.ToSingle(BitConverter.GetBytes(bits), 0));
+		}
+		
+		// original lucene floatToByte
+		internal static sbyte Orig_floatToByte(float f)
+		{
+			if (f < 0.0f)
+			// round negatives up to zero
+				f = 0.0f;
+			
+			if (f == 0.0f)
+			// zero is a special case
+				return 0;
+			
+			int bits = BitConverter.ToInt32(BitConverter.GetBytes(f), 0); // parse float into parts
+			int mantissa = (bits & 0xffffff) >> 21;
+			int exponent = (((bits >> 24) & 0x7f) - 63) + 15;
+			
+			if (exponent > 31)
+			{
+				// overflow: use max value
+				exponent = 31;
+				mantissa = 7;
+			}
+			
+			if (exponent < 0)
+			{
+				// underflow: use min value
+				exponent = 0;
+				mantissa = 1;
+			}
+			
+			return (sbyte) ((exponent << 3) | mantissa); // pack into a byte
+		}
+		
+        [Test]
+		public virtual void  TestByteToFloat()
+		{
+			for (int i = 0; i < 256; i++)
+			{
+				float f1 = Orig_byteToFloat((byte) i);
+				float f2 = SmallFloat.ByteToFloat((byte) i, 3, 15);
+				float f3 = SmallFloat.Byte315ToFloat((byte) i);
+				Assert.AreEqual(f1, f2, 0.0);
+				Assert.AreEqual(f2, f3, 0.0);
+				
+				float f4 = SmallFloat.ByteToFloat((byte) i, 5, 2);
+				float f5 = SmallFloat.Byte52ToFloat((byte) i);
+				Assert.AreEqual(f4, f5, 0.0);
+			}
+		}
+		
+		[Test]
+        public virtual void  TestFloatToByte()
+		{
+			System.Random rand = new System.Random((System.Int32) 0);
+			// up iterations for more exhaustive test after changing something
+			for (int i = 0; i < 100000; i++)
+			{
+				float f = BitConverter.ToSingle(BitConverter.GetBytes(rand.Next()), 0);
+				if (f != f)
+					continue; // skip NaN
+				sbyte b1 = Orig_floatToByte(f);
+				sbyte b2 = SmallFloat.FloatToByte(f, 3, 15);
+				sbyte b3 = SmallFloat.FloatToByte315(f);
+				Assert.AreEqual(b1, b2);
+				Assert.AreEqual(b2, b3);
+				
+				sbyte b4 = SmallFloat.FloatToByte(f, 5, 2);
+				sbyte b5 = SmallFloat.FloatToByte52(f);
+				Assert.AreEqual(b4, b5);
+			}
+		}
+		
+		/// <summary> 
+		/// // Do an exhaustive test of all possible floating point values
+		/// // for the 315 float against the original norm encoding in Similarity.
+		/// // Takes 75 seconds on my Pentium4 3GHz, with Java5 -server
+		/// public void testAllFloats() {
+		/// for(int i = Integer.MIN_VALUE;;i++) {
+		/// float f = Float.intBitsToFloat(i);
+		/// if (f==f) { // skip non-numbers
+		/// byte b1 = orig_floatToByte(f);
+		/// byte b2 = SmallFloat.floatToByte315(f);
+		/// if (b1!=b2) {
+		/// TestCase.Fail("Failed floatToByte315 for float " + f);
+		/// }
+		/// }
+		/// if (i==Integer.MAX_VALUE) break;
+		/// }
+		/// }
+		/// *
+		/// </summary>
+	}
+}
\ No newline at end of file

Added: incubator/lucene.net/trunk/C#/src/Test/Util/TestStringHelper.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Util/TestStringHelper.cs?rev=411501&view=auto
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Util/TestStringHelper.cs (added)
+++ incubator/lucene.net/trunk/C#/src/Test/Util/TestStringHelper.cs Sat Jun  3 19:41:13 2006
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using NUnit.Framework;
+
+namespace Lucene.Net.Util
+{
+	[TestFixture]
+	public class TestStringHelper
+	{
+		
+		[Test]
+		public virtual void  TestStringDifference()
+		{
+			System.String test1 = "test";
+			System.String test2 = "testing";
+			
+			int result = StringHelper.StringDifference(test1, test2);
+			Assert.IsTrue(result == 4);
+			
+			test2 = "foo";
+			result = StringHelper.StringDifference(test1, test2);
+			Assert.IsTrue(result == 0);
+			
+			test2 = "test";
+			result = StringHelper.StringDifference(test1, test2);
+			Assert.IsTrue(result == 4);
+		}
+	}
+}
\ No newline at end of file



Mime
View raw message