lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r882204 - /incubator/lucene.net/trunk/C#/src/Test/Index/TestIndexWriter.cs
Date Thu, 19 Nov 2009 16:51:17 GMT
Author: aroush
Date: Thu Nov 19 16:51:17 2009
New Revision: 882204

URL: http://svn.apache.org/viewvc?rev=882204&view=rev
Log:
Fixed NUnit test-cases for: TestIndexWriter

Modified:
    incubator/lucene.net/trunk/C#/src/Test/Index/TestIndexWriter.cs

Modified: incubator/lucene.net/trunk/C#/src/Test/Index/TestIndexWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Index/TestIndexWriter.cs?rev=882204&r1=882203&r2=882204&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Index/TestIndexWriter.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Index/TestIndexWriter.cs Thu Nov 19 16:51:17 2009
@@ -95,7 +95,7 @@
 				lockFactory = null;
 				myLockFactory = new SingleInstanceLockFactory();
 			}
-			public Lock MakeLock(System.String name)
+			public override Lock MakeLock(System.String name)
 			{
 				return myLockFactory.MakeLock(name);
 			}
@@ -360,6 +360,8 @@
 			private void  InitBlock(TestIndexWriter enclosingInstance)
 			{
 				this.enclosingInstance = enclosingInstance;
+                this.termAtt = (TermAttribute)this.AddAttribute(typeof(TermAttribute));
+                this.posIncrAtt = (PositionIncrementAttribute)this.AddAttribute(typeof(PositionIncrementAttribute));
 			}
 			private TestIndexWriter enclosingInstance;
 			public TestIndexWriter Enclosing_Instance
@@ -370,8 +372,8 @@
 				}
 				
 			}
-			internal TermAttribute termAtt = (TermAttribute) (new Lucene.Net.Util.AttributeSource()).AddAttribute(typeof(TermAttribute));
-			internal PositionIncrementAttribute posIncrAtt = (PositionIncrementAttribute) (new Lucene.Net.Util.AttributeSource()).AddAttribute(typeof(PositionIncrementAttribute));
+			internal TermAttribute termAtt;
+			internal PositionIncrementAttribute posIncrAtt;
 			
 			internal System.Collections.IEnumerator tokens = new System.Collections.ArrayList(new
System.String[]{"a", "b", "c"}).GetEnumerator();
 			internal bool first = true;



Mime
View raw message