lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r677462 - in /incubator/lucene.net/trunk/C#/src: Lucene.Net/Index/Term.cs Test/Index/TestPayloads.cs
Date Wed, 16 Jul 2008 22:58:51 GMT
Author: aroush
Date: Wed Jul 16 15:58:51 2008
New Revision: 677462

URL: http://svn.apache.org/viewvc?rev=677462&view=rev
Log:
LUCENENET-116: Ambiguous name "text" in term class when in VB.NET

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/Term.cs
    incubator/lucene.net/trunk/C#/src/Test/Index/TestPayloads.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/Term.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/Term.cs?rev=677462&r1=677461&r2=677462&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/Term.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/Term.cs Wed Jul 16 15:58:51 2008
@@ -31,8 +31,14 @@
 	public sealed class Term : System.IComparable
 	{
 		internal System.String field;
-		public System.String text;
-		
+		internal System.String text;
+
+        // For testing only
+        public System.String text_ForNUnitTest
+        {
+            get { return text; }
+        }
+
 		/// <summary>Constructs a Term with the given field and text.
 		/// <p>Note that a null field or null text value results in undefined
 		/// behavior for most Lucene APIs that accept a Term parameter. 

Modified: incubator/lucene.net/trunk/C#/src/Test/Index/TestPayloads.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Index/TestPayloads.cs?rev=677462&r1=677461&r2=677462&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Index/TestPayloads.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Index/TestPayloads.cs Wed Jul 16 15:58:51 2008
@@ -235,7 +235,7 @@
 			System.Text.StringBuilder sb = new System.Text.StringBuilder();
 			for (int i = 0; i < terms.Length; i++)
 			{
-				sb.Append(terms[i].text);
+				sb.Append(terms[i].text_ForNUnitTest);
 				sb.Append(" ");
 			}
 			System.String content = sb.ToString();
@@ -634,7 +634,7 @@
 					{
 						tp.NextPosition();
 						System.String s = System.Text.Encoding.UTF8.GetString(tp.GetPayload(new byte[5], 0));
-						Assert.AreEqual(s, terms.Term().text);
+						Assert.AreEqual(s, terms.Term().text_ForNUnitTest);
 					}
 				}
 				tp.Close();



Mime
View raw message