lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccurr...@apache.org
Subject svn commit: r1325831 [4/4] - in /incubator/lucene.net/trunk: src/contrib/Analyzers/AR/ src/contrib/Analyzers/BR/ src/contrib/Analyzers/CJK/ src/contrib/Analyzers/Cn/ src/contrib/Analyzers/Compound/ src/contrib/Analyzers/De/ src/contrib/Analyzers/El/ sr...
Date Fri, 13 Apr 2012 16:33:38 GMT
Modified: incubator/lucene.net/trunk/test/core/Analysis/Tokenattributes/TestTermAttributeImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/Tokenattributes/TestTermAttributeImpl.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/Tokenattributes/TestTermAttributeImpl.cs
(original)
+++ incubator/lucene.net/trunk/test/core/Analysis/Tokenattributes/TestTermAttributeImpl.cs
Fri Apr 13 16:33:33 2012
@@ -35,7 +35,7 @@ namespace Lucene.Net.Analysis.Tokenattri
         [Test]
 		public virtual void  TestResize()
 		{
-			TermAttributeImpl t = new TermAttributeImpl();
+			TermAttribute t = new TermAttribute();
 			char[] content = "hello".ToCharArray();
 			t.SetTermBuffer(content, 0, content.Length);
 			for (int i = 0; i < 2000; i++)
@@ -49,7 +49,7 @@ namespace Lucene.Net.Analysis.Tokenattri
         [Test]
 		public virtual void  TestGrow()
 		{
-			TermAttributeImpl t = new TermAttributeImpl();
+			TermAttribute t = new TermAttribute();
 			System.Text.StringBuilder buf = new System.Text.StringBuilder("ab");
 			for (int i = 0; i < 20; i++)
 			{
@@ -63,7 +63,7 @@ namespace Lucene.Net.Analysis.Tokenattri
 			Assert.AreEqual(1179654, t.TermBuffer().Length);
 			
 			// now as a string, first variant
-			t = new TermAttributeImpl();
+			t = new TermAttribute();
 			buf = new System.Text.StringBuilder("ab");
 			for (int i = 0; i < 20; i++)
 			{
@@ -77,7 +77,7 @@ namespace Lucene.Net.Analysis.Tokenattri
 			Assert.AreEqual(1179654, t.TermBuffer().Length);
 			
 			// now as a string, second variant
-			t = new TermAttributeImpl();
+			t = new TermAttribute();
 			buf = new System.Text.StringBuilder("ab");
 			for (int i = 0; i < 20; i++)
 			{
@@ -91,7 +91,7 @@ namespace Lucene.Net.Analysis.Tokenattri
 			Assert.AreEqual(1179654, t.TermBuffer().Length);
 			
 			// Test for slow growth to a long term
-			t = new TermAttributeImpl();
+			t = new TermAttribute();
 			buf = new System.Text.StringBuilder("a");
 			for (int i = 0; i < 20000; i++)
 			{
@@ -105,7 +105,7 @@ namespace Lucene.Net.Analysis.Tokenattri
 			Assert.AreEqual(20167, t.TermBuffer().Length);
 			
 			// Test for slow growth to a long term
-			t = new TermAttributeImpl();
+			t = new TermAttribute();
 			buf = new System.Text.StringBuilder("a");
 			for (int i = 0; i < 20000; i++)
 			{
@@ -123,7 +123,7 @@ namespace Lucene.Net.Analysis.Tokenattri
 		public virtual void  TestToString()
 		{
 			char[] b = new char[]{'a', 'l', 'o', 'h', 'a'};
-			TermAttributeImpl t = new TermAttributeImpl();
+			TermAttribute t = new TermAttribute();
 			t.SetTermBuffer(b, 0, 5);
 			Assert.AreEqual("term=aloha", t.ToString());
 			
@@ -134,7 +134,7 @@ namespace Lucene.Net.Analysis.Tokenattri
         [Test]
 		public virtual void  TestMixedStringArray()
 		{
-			TermAttributeImpl t = new TermAttributeImpl();
+			TermAttribute t = new TermAttribute();
 			t.SetTermBuffer("hello");
 			Assert.AreEqual(t.TermLength(), 5);
 			Assert.AreEqual(t.Term(), "hello");
@@ -154,11 +154,11 @@ namespace Lucene.Net.Analysis.Tokenattri
         [Test]
 		public virtual void  TestClone()
 		{
-			TermAttributeImpl t = new TermAttributeImpl();
+			TermAttribute t = new TermAttribute();
 			char[] content = "hello".ToCharArray();
 			t.SetTermBuffer(content, 0, 5);
 			char[] buf = t.TermBuffer();
-			TermAttributeImpl copy = (TermAttributeImpl) TestSimpleAttributeImpls.AssertCloneIsEqual(t);
+			TermAttribute copy = (TermAttribute) TestSimpleAttributeImpls.AssertCloneIsEqual(t);
 			Assert.AreEqual(t.Term(), copy.Term());
 			Assert.AreNotSame(buf, copy.TermBuffer());
 		}
@@ -166,13 +166,13 @@ namespace Lucene.Net.Analysis.Tokenattri
         [Test]
 		public virtual void  TestEquals()
 		{
-			TermAttributeImpl t1a = new TermAttributeImpl();
+			TermAttribute t1a = new TermAttribute();
 			char[] content1a = "hello".ToCharArray();
 			t1a.SetTermBuffer(content1a, 0, 5);
-			TermAttributeImpl t1b = new TermAttributeImpl();
+			TermAttribute t1b = new TermAttribute();
 			char[] content1b = "hello".ToCharArray();
 			t1b.SetTermBuffer(content1b, 0, 5);
-			TermAttributeImpl t2 = new TermAttributeImpl();
+			TermAttribute t2 = new TermAttribute();
 			char[] content2 = "hello2".ToCharArray();
 			t2.SetTermBuffer(content2, 0, 6);
 			Assert.IsTrue(t1a.Equals(t1b));
@@ -183,16 +183,16 @@ namespace Lucene.Net.Analysis.Tokenattri
         [Test]
 		public virtual void  TestCopyTo()
 		{
-			TermAttributeImpl t = new TermAttributeImpl();
-			TermAttributeImpl copy = (TermAttributeImpl) TestSimpleAttributeImpls.AssertCopyIsEqual(t);
+			TermAttribute t = new TermAttribute();
+			TermAttribute copy = (TermAttribute) TestSimpleAttributeImpls.AssertCopyIsEqual(t);
 			Assert.AreEqual("", t.Term());
 			Assert.AreEqual("", copy.Term());
 			
-			t = new TermAttributeImpl();
+			t = new TermAttribute();
 			char[] content = "hello".ToCharArray();
 			t.SetTermBuffer(content, 0, 5);
 			char[] buf = t.TermBuffer();
-			copy = (TermAttributeImpl) TestSimpleAttributeImpls.AssertCopyIsEqual(t);
+			copy = (TermAttribute) TestSimpleAttributeImpls.AssertCopyIsEqual(t);
 			Assert.AreEqual(t.Term(), copy.Term());
 			Assert.AreNotSame(buf, copy.TermBuffer());
 		}

Modified: incubator/lucene.net/trunk/test/core/Index/TestDocumentWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Index/TestDocumentWriter.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Index/TestDocumentWriter.cs (original)
+++ incubator/lucene.net/trunk/test/core/Index/TestDocumentWriter.cs Fri Apr 13 16:33:33 2012
@@ -16,6 +16,7 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Documents;
 using Lucene.Net.Util;
 using NUnit.Framework;
@@ -27,9 +28,6 @@ using TokenStream = Lucene.Net.Analysis.
 using WhitespaceAnalyzer = Lucene.Net.Analysis.WhitespaceAnalyzer;
 using WhitespaceTokenizer = Lucene.Net.Analysis.WhitespaceTokenizer;
 using StandardAnalyzer = Lucene.Net.Analysis.Standard.StandardAnalyzer;
-using PayloadAttribute = Lucene.Net.Analysis.Tokenattributes.PayloadAttribute;
-using PositionIncrementAttribute = Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using Index = Lucene.Net.Documents.Field.Index;
@@ -86,9 +84,9 @@ namespace Lucene.Net.Index
 				private void  InitBlock(AnonymousClassAnalyzer1 enclosingInstance)
 				{
 					this.enclosingInstance = enclosingInstance;
-                    termAtt = AddAttribute<TermAttribute>();
-                    payloadAtt = AddAttribute<PayloadAttribute>();
-                    posIncrAtt = AddAttribute<PositionIncrementAttribute>();
+                    termAtt = AddAttribute<ITermAttribute>();
+                    payloadAtt = AddAttribute<IPayloadAttribute>();
+                    posIncrAtt = AddAttribute<IPositionIncrementAttribute>();
 				}
 				private AnonymousClassAnalyzer1 enclosingInstance;
 				public AnonymousClassAnalyzer1 Enclosing_Instance
@@ -137,9 +135,9 @@ namespace Lucene.Net.Index
 					return true;
 				}
 				
-				internal TermAttribute termAtt;
-				internal PayloadAttribute payloadAtt;
-				internal PositionIncrementAttribute posIncrAtt;
+				internal ITermAttribute termAtt;
+				internal IPayloadAttribute payloadAtt;
+				internal IPositionIncrementAttribute posIncrAtt;
 			}
 			private void  InitBlock(TestDocumentWriter enclosingInstance)
 			{
@@ -168,7 +166,7 @@ namespace Lucene.Net.Index
 			private void  InitBlock(TestDocumentWriter enclosingInstance)
 			{
 				this.enclosingInstance = enclosingInstance;
-                termAtt = AddAttribute<TermAttribute>();
+                termAtt = AddAttribute<ITermAttribute>();
 			}
 			private TestDocumentWriter enclosingInstance;
 			public TestDocumentWriter Enclosing_Instance
@@ -182,7 +180,7 @@ namespace Lucene.Net.Index
 			private System.String[] tokens = new System.String[]{"term1", "term2", "term3", "term2"};
 			private int index = 0;
 			
-			private TermAttribute termAtt;
+			private ITermAttribute termAtt;
 			
 			public override bool IncrementToken()
 			{

Modified: incubator/lucene.net/trunk/test/core/Index/TestIndexWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Index/TestIndexWriter.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Index/TestIndexWriter.cs (original)
+++ incubator/lucene.net/trunk/test/core/Index/TestIndexWriter.cs Fri Apr 13 16:33:33 2012
@@ -17,6 +17,7 @@
 
 using System;
 using System.Threading;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Support;
 using NUnit.Framework;
 
@@ -31,8 +32,6 @@ using WhitespaceAnalyzer = Lucene.Net.An
 using WhitespaceTokenizer = Lucene.Net.Analysis.WhitespaceTokenizer;
 using StandardAnalyzer = Lucene.Net.Analysis.Standard.StandardAnalyzer;
 using StandardTokenizer = Lucene.Net.Analysis.Standard.StandardTokenizer;
-using PositionIncrementAttribute = Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using AlreadyClosedException = Lucene.Net.Store.AlreadyClosedException;
@@ -354,8 +353,8 @@ namespace Lucene.Net.Index
             private void InitBlock(TestIndexWriter enclosingInstance)
             {
                 this.enclosingInstance = enclosingInstance;
-                this.termAtt = this.AddAttribute<TermAttribute>();
-                this.posIncrAtt = this.AddAttribute<PositionIncrementAttribute>();
+                this.termAtt = this.AddAttribute<ITermAttribute>();
+                this.posIncrAtt = this.AddAttribute<IPositionIncrementAttribute>();
             }
             private TestIndexWriter enclosingInstance;
             public TestIndexWriter Enclosing_Instance
@@ -366,8 +365,8 @@ namespace Lucene.Net.Index
                 }
 
             }
-            internal TermAttribute termAtt;
-            internal PositionIncrementAttribute posIncrAtt;
+            internal ITermAttribute termAtt;
+            internal IPositionIncrementAttribute posIncrAtt;
 
             internal System.Collections.IEnumerator tokens = new System.Collections.ArrayList(new
System.String[] { "a", "b", "c" }).GetEnumerator();
             internal bool first = true;

Modified: incubator/lucene.net/trunk/test/core/Index/TestMultiLevelSkipList.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Index/TestMultiLevelSkipList.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Index/TestMultiLevelSkipList.cs (original)
+++ incubator/lucene.net/trunk/test/core/Index/TestMultiLevelSkipList.cs Fri Apr 13 16:33:33
2012
@@ -16,14 +16,13 @@
  */
 
 using System;
-
+using Lucene.Net.Analysis.Tokenattributes;
 using NUnit.Framework;
 
 using Analyzer = Lucene.Net.Analysis.Analyzer;
 using LowerCaseTokenizer = Lucene.Net.Analysis.LowerCaseTokenizer;
 using TokenFilter = Lucene.Net.Analysis.TokenFilter;
 using TokenStream = Lucene.Net.Analysis.TokenStream;
-using PayloadAttribute = Lucene.Net.Analysis.Tokenattributes.PayloadAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using Index = Lucene.Net.Documents.Field.Index;
@@ -108,11 +107,11 @@ namespace Lucene.Net.Index
 		{
 			internal static int count = 0;
 			
-			internal PayloadAttribute payloadAtt;
+			internal IPayloadAttribute payloadAtt;
 			
 			protected internal PayloadFilter(TokenStream input):base(input)
 			{
-				payloadAtt =  AddAttribute<PayloadAttribute>();
+				payloadAtt =  AddAttribute<IPayloadAttribute>();
 			}
 			
 			public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/Index/TestPayloads.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Index/TestPayloads.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Index/TestPayloads.cs (original)
+++ incubator/lucene.net/trunk/test/core/Index/TestPayloads.cs Fri Apr 13 16:33:33 2012
@@ -16,6 +16,7 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Support;
 using NUnit.Framework;
 
@@ -24,8 +25,6 @@ using TokenFilter = Lucene.Net.Analysis.
 using TokenStream = Lucene.Net.Analysis.TokenStream;
 using WhitespaceAnalyzer = Lucene.Net.Analysis.WhitespaceAnalyzer;
 using WhitespaceTokenizer = Lucene.Net.Analysis.WhitespaceTokenizer;
-using PayloadAttribute = Lucene.Net.Analysis.Tokenattributes.PayloadAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using Directory = Lucene.Net.Store.Directory;
@@ -513,14 +512,14 @@ namespace Lucene.Net.Index
 			private int length;
 			private int offset;
 			internal Payload payload = new Payload();
-			internal PayloadAttribute payloadAtt;
+			internal IPayloadAttribute payloadAtt;
 			
 			public PayloadFilter(TokenStream in_Renamed, byte[] data, int offset, int length):base(in_Renamed)
 			{
 				this.data = data;
 				this.length = length;
 				this.offset = offset;
-				payloadAtt =  AddAttribute<PayloadAttribute>();
+				payloadAtt =  AddAttribute<IPayloadAttribute>();
 			}
 			
 			public override bool IncrementToken()
@@ -615,8 +614,8 @@ namespace Lucene.Net.Index
 			private ByteArrayPool pool;
 			private System.String term;
 			
-			internal TermAttribute termAtt;
-			internal PayloadAttribute payloadAtt;
+			internal ITermAttribute termAtt;
+			internal IPayloadAttribute payloadAtt;
 			
 			internal PoolingPayloadTokenStream(TestPayloads enclosingInstance, ByteArrayPool pool)
 			{
@@ -626,8 +625,8 @@ namespace Lucene.Net.Index
 				Enclosing_Instance.GenerateRandomData(payload);
 				term = pool.BytesToString(payload);
 				first = true;
-				payloadAtt =  AddAttribute<PayloadAttribute>();
-				termAtt =  AddAttribute<TermAttribute>();
+				payloadAtt =  AddAttribute<IPayloadAttribute>();
+				termAtt =  AddAttribute<ITermAttribute>();
 			}
 			
 			public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/Index/TestTermVectorsReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Index/TestTermVectorsReader.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Index/TestTermVectorsReader.cs (original)
+++ incubator/lucene.net/trunk/test/core/Index/TestTermVectorsReader.cs Fri Apr 13 16:33:33
2012
@@ -16,14 +16,11 @@
  */
 
 using System;
-
+using Lucene.Net.Analysis.Tokenattributes;
 using NUnit.Framework;
 
 using Analyzer = Lucene.Net.Analysis.Analyzer;
 using TokenStream = Lucene.Net.Analysis.TokenStream;
-using OffsetAttribute = Lucene.Net.Analysis.Tokenattributes.OffsetAttribute;
-using PositionIncrementAttribute = Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using MockRAMDirectory = Lucene.Net.Store.MockRAMDirectory;
@@ -171,16 +168,16 @@ namespace Lucene.Net.Index
 			}
 			internal int tokenUpto;
 			
-			internal TermAttribute termAtt;
-			internal PositionIncrementAttribute posIncrAtt;
-			internal OffsetAttribute offsetAtt;
+			internal ITermAttribute termAtt;
+			internal IPositionIncrementAttribute posIncrAtt;
+			internal IOffsetAttribute offsetAtt;
 			
 			public MyTokenStream(TestTermVectorsReader enclosingInstance)
 			{
 				InitBlock(enclosingInstance);
-				termAtt =  AddAttribute<TermAttribute>();
-				posIncrAtt =  AddAttribute<PositionIncrementAttribute>();
-				offsetAtt =  AddAttribute<OffsetAttribute>();
+				termAtt =  AddAttribute<ITermAttribute>();
+				posIncrAtt =  AddAttribute<IPositionIncrementAttribute>();
+				offsetAtt =  AddAttribute<IOffsetAttribute>();
 			}
 			
 			public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/Index/TestTermdocPerf.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Index/TestTermdocPerf.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Index/TestTermdocPerf.cs (original)
+++ incubator/lucene.net/trunk/test/core/Index/TestTermdocPerf.cs Fri Apr 13 16:33:33 2012
@@ -16,12 +16,11 @@
  */
 
 using System;
-
+using Lucene.Net.Analysis.Tokenattributes;
 using NUnit.Framework;
 
 using Analyzer = Lucene.Net.Analysis.Analyzer;
 using TokenStream = Lucene.Net.Analysis.TokenStream;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using Directory = Lucene.Net.Store.Directory;
@@ -37,13 +36,13 @@ namespace Lucene.Net.Index
 	class RepeatingTokenStream:TokenStream
 	{
 		public int num;
-		internal TermAttribute termAtt;
+		internal ITermAttribute termAtt;
 		internal System.String value_Renamed;
 		
 		public RepeatingTokenStream(System.String val)
 		{
 			this.value_Renamed = val;
-			this.termAtt =  AddAttribute<TermAttribute>();
+			this.termAtt =  AddAttribute<ITermAttribute>();
 		}
 		
 		public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/QueryParser/TestMultiAnalyzer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/QueryParser/TestMultiAnalyzer.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/QueryParser/TestMultiAnalyzer.cs (original)
+++ incubator/lucene.net/trunk/test/core/QueryParser/TestMultiAnalyzer.cs Fri Apr 13 16:33:33
2012
@@ -16,7 +16,7 @@
  */
 
 using System;
-
+using Lucene.Net.Analysis.Tokenattributes;
 using NUnit.Framework;
 
 using Analyzer = Lucene.Net.Analysis.Analyzer;
@@ -24,10 +24,6 @@ using LowerCaseFilter = Lucene.Net.Analy
 using TokenFilter = Lucene.Net.Analysis.TokenFilter;
 using TokenStream = Lucene.Net.Analysis.TokenStream;
 using StandardTokenizer = Lucene.Net.Analysis.Standard.StandardTokenizer;
-using OffsetAttribute = Lucene.Net.Analysis.Tokenattributes.OffsetAttribute;
-using PositionIncrementAttribute = Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
-using TypeAttribute = Lucene.Net.Analysis.Tokenattributes.TypeAttribute;
 using BaseTokenStreamTestCase = Lucene.Net.Test.Analysis.BaseTokenStreamTestCase;
 using Query = Lucene.Net.Search.Query;
 
@@ -175,18 +171,18 @@ namespace Lucene.Net.QueryParsers
 			private int prevStartOffset;
 			private int prevEndOffset;
 			
-			internal TermAttribute termAtt;
-			internal PositionIncrementAttribute posIncrAtt;
-			internal OffsetAttribute offsetAtt;
-			internal TypeAttribute typeAtt;
+			internal ITermAttribute termAtt;
+			internal IPositionIncrementAttribute posIncrAtt;
+			internal IOffsetAttribute offsetAtt;
+			internal ITypeAttribute typeAtt;
 			
 			public TestFilter(TestMultiAnalyzer enclosingInstance, TokenStream in_Renamed):base(in_Renamed)
 			{
 				InitBlock(enclosingInstance);
-				termAtt =  AddAttribute<TermAttribute>();
-				posIncrAtt =  AddAttribute<PositionIncrementAttribute>();
-				offsetAtt =  AddAttribute<OffsetAttribute>();
-				typeAtt =  AddAttribute<TypeAttribute>();
+				termAtt =  AddAttribute<ITermAttribute>();
+				posIncrAtt =  AddAttribute<IPositionIncrementAttribute>();
+				offsetAtt =  AddAttribute<IOffsetAttribute>();
+				typeAtt =  AddAttribute<ITypeAttribute>();
 			}
 			
 			public override bool IncrementToken()
@@ -278,14 +274,14 @@ namespace Lucene.Net.QueryParsers
 				
 			}
 			
-			internal TermAttribute termAtt;
-			internal PositionIncrementAttribute posIncrAtt;
+			internal ITermAttribute termAtt;
+			internal IPositionIncrementAttribute posIncrAtt;
 			
 			public TestPosIncrementFilter(TestMultiAnalyzer enclosingInstance, TokenStream in_Renamed):base(in_Renamed)
 			{
 				InitBlock(enclosingInstance);
-				termAtt =  AddAttribute<TermAttribute>();
-				posIncrAtt =  AddAttribute<PositionIncrementAttribute>();
+				termAtt =  AddAttribute<ITermAttribute>();
+				posIncrAtt =  AddAttribute<IPositionIncrementAttribute>();
 			}
 			
 			public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/QueryParser/TestQueryParser.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/QueryParser/TestQueryParser.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/QueryParser/TestQueryParser.cs (original)
+++ incubator/lucene.net/trunk/test/core/QueryParser/TestQueryParser.cs Fri Apr 13 16:33:33
2012
@@ -17,6 +17,7 @@
 
 using System;
 using System.Collections.Generic;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Support;
 using NUnit.Framework;
 
@@ -30,8 +31,6 @@ using TokenFilter = Lucene.Net.Analysis.
 using TokenStream = Lucene.Net.Analysis.TokenStream;
 using WhitespaceAnalyzer = Lucene.Net.Analysis.WhitespaceAnalyzer;
 using StandardAnalyzer = Lucene.Net.Analysis.Standard.StandardAnalyzer;
-using OffsetAttribute = Lucene.Net.Analysis.Tokenattributes.OffsetAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using DateField = Lucene.Net.Documents.DateField;
 using DateTools = Lucene.Net.Documents.DateTools;
 using Document = Lucene.Net.Documents.Document;
@@ -130,16 +129,16 @@ namespace Lucene.Net.QueryParsers
 		
 		public class QPTestFilter : TokenFilter
 		{
-			internal TermAttribute termAtt;
-			internal OffsetAttribute offsetAtt;
+			internal ITermAttribute termAtt;
+			internal IOffsetAttribute offsetAtt;
 			
 			/// <summary> Filter which discards the token 'stop' and which expands the
 			/// token 'phrase' into 'phrase1 phrase2'
 			/// </summary>
 			public QPTestFilter(TokenStream in_Renamed):base(in_Renamed)
 			{
-				termAtt =  AddAttribute<TermAttribute>();
-				offsetAtt =  AddAttribute<OffsetAttribute>();
+				termAtt =  AddAttribute<ITermAttribute>();
+				offsetAtt =  AddAttribute<IOffsetAttribute>();
 			}
 			
 			internal bool inPhrase = false;

Modified: incubator/lucene.net/trunk/test/core/Search/Payloads/PayloadHelper.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/Payloads/PayloadHelper.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/Payloads/PayloadHelper.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/Payloads/PayloadHelper.cs Fri Apr 13 16:33:33
2012
@@ -16,11 +16,10 @@
  */
 
 using System;
-
+using Lucene.Net.Analysis.Tokenattributes;
 using NUnit.Framework;
 
 using Lucene.Net.Analysis;
-using PayloadAttribute = Lucene.Net.Analysis.Tokenattributes.PayloadAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using IndexWriter = Lucene.Net.Index.IndexWriter;
@@ -94,13 +93,13 @@ namespace Lucene.Net.Search.Payloads
 			}
 			internal System.String fieldName;
 			internal int numSeen = 0;
-			internal PayloadAttribute payloadAtt;
+			internal IPayloadAttribute payloadAtt;
 			
 			public PayloadFilter(PayloadHelper enclosingInstance, TokenStream input, System.String
fieldName):base(input)
 			{
 				InitBlock(enclosingInstance);
 				this.fieldName = fieldName;
-                payloadAtt = AddAttribute<PayloadAttribute>();
+                payloadAtt = AddAttribute<IPayloadAttribute>();
 			}
 			
 			public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/Search/Payloads/TestPayloadNearQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/Payloads/TestPayloadNearQuery.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/Payloads/TestPayloadNearQuery.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/Payloads/TestPayloadNearQuery.cs Fri Apr 13
16:33:33 2012
@@ -17,6 +17,7 @@
 
 using System;
 using System.Collections.Generic;
+using Lucene.Net.Analysis.Tokenattributes;
 using NUnit.Framework;
 
 using Analyzer = Lucene.Net.Analysis.Analyzer;
@@ -24,7 +25,6 @@ using LowerCaseTokenizer = Lucene.Net.An
 using Token = Lucene.Net.Analysis.Token;
 using TokenFilter = Lucene.Net.Analysis.TokenFilter;
 using TokenStream = Lucene.Net.Analysis.TokenStream;
-using PayloadAttribute = Lucene.Net.Analysis.Tokenattributes.PayloadAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using IndexWriter = Lucene.Net.Index.IndexWriter;
@@ -107,13 +107,13 @@ namespace Lucene.Net.Search.Payloads
 			}
 			internal System.String fieldName;
 			internal int numSeen = 0;
-			protected internal PayloadAttribute payAtt;
+			protected internal IPayloadAttribute payAtt;
 			
 			public PayloadFilter(TestPayloadNearQuery enclosingInstance, TokenStream input, System.String
fieldName):base(input)
 			{
 				InitBlock(enclosingInstance);
 				this.fieldName = fieldName;
-                payAtt = AddAttribute<PayloadAttribute>();
+                payAtt = AddAttribute<IPayloadAttribute>();
 			}
 			
 			public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/Search/Payloads/TestPayloadTermQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/Payloads/TestPayloadTermQuery.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/Payloads/TestPayloadTermQuery.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/Payloads/TestPayloadTermQuery.cs Fri Apr 13
16:33:33 2012
@@ -16,14 +16,13 @@
  */
 
 using System;
-
+using Lucene.Net.Analysis.Tokenattributes;
 using NUnit.Framework;
 
 using Analyzer = Lucene.Net.Analysis.Analyzer;
 using LowerCaseTokenizer = Lucene.Net.Analysis.LowerCaseTokenizer;
 using TokenFilter = Lucene.Net.Analysis.TokenFilter;
 using TokenStream = Lucene.Net.Analysis.TokenStream;
-using PayloadAttribute = Lucene.Net.Analysis.Tokenattributes.PayloadAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using IndexWriter = Lucene.Net.Index.IndexWriter;
@@ -117,13 +116,13 @@ namespace Lucene.Net.Search.Payloads
 			internal System.String fieldName;
 			internal int numSeen = 0;
 			
-			internal PayloadAttribute payloadAtt;
+			internal IPayloadAttribute payloadAtt;
 			
 			public PayloadFilter(TestPayloadTermQuery enclosingInstance, TokenStream input, System.String
fieldName):base(input)
 			{
 				InitBlock(enclosingInstance);
 				this.fieldName = fieldName;
-                payloadAtt = AddAttribute<PayloadAttribute>();
+                payloadAtt = AddAttribute<IPayloadAttribute>();
 			}
 			
 			public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/Search/Spans/TestPayloadSpans.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/Spans/TestPayloadSpans.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/Spans/TestPayloadSpans.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/Spans/TestPayloadSpans.cs Fri Apr 13 16:33:33
2012
@@ -16,6 +16,7 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Support;
 using NUnit.Framework;
 
@@ -23,9 +24,6 @@ using Analyzer = Lucene.Net.Analysis.Ana
 using LowerCaseTokenizer = Lucene.Net.Analysis.LowerCaseTokenizer;
 using TokenFilter = Lucene.Net.Analysis.TokenFilter;
 using TokenStream = Lucene.Net.Analysis.TokenStream;
-using PayloadAttribute = Lucene.Net.Analysis.Tokenattributes.PayloadAttribute;
-using PositionIncrementAttribute = Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using CorruptIndexException = Lucene.Net.Index.CorruptIndexException;
@@ -545,9 +543,9 @@ namespace Lucene.Net.Search.Spans
 			internal System.Collections.Hashtable entities = new System.Collections.Hashtable();
 			internal System.Collections.Hashtable nopayload = new System.Collections.Hashtable();
 			internal int pos;
-			internal PayloadAttribute payloadAtt;
-			internal TermAttribute termAtt;
-			internal PositionIncrementAttribute posIncrAtt;
+			internal IPayloadAttribute payloadAtt;
+			internal ITermAttribute termAtt;
+			internal IPositionIncrementAttribute posIncrAtt;
 			
 			public PayloadFilter(TestPayloadSpans enclosingInstance, TokenStream input, System.String
fieldName):base(input)
 			{
@@ -558,9 +556,9 @@ namespace Lucene.Net.Search.Spans
 				CollectionsHelper.AddIfNotContains(entities, "one");
 				CollectionsHelper.AddIfNotContains(nopayload, "nopayload");
 				CollectionsHelper.AddIfNotContains(nopayload, "np");
-                termAtt = AddAttribute<TermAttribute>();
-                posIncrAtt = AddAttribute<PositionIncrementAttribute>();
-                payloadAtt = AddAttribute<PayloadAttribute>();
+                termAtt = AddAttribute<ITermAttribute>();
+                posIncrAtt = AddAttribute<IPositionIncrementAttribute>();
+                payloadAtt = AddAttribute<IPayloadAttribute>();
 			}
 			
 			public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/Search/TestPositionIncrement.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/TestPositionIncrement.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/TestPositionIncrement.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/TestPositionIncrement.cs Fri Apr 13 16:33:33
2012
@@ -18,6 +18,7 @@
 using System;
 using System.Collections.Generic;
 using Lucene.Net.Analysis;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Util;
 using NUnit.Framework;
 
@@ -27,10 +28,6 @@ using StopFilter = Lucene.Net.Analysis.S
 using TokenFilter = Lucene.Net.Analysis.TokenFilter;
 using TokenStream = Lucene.Net.Analysis.TokenStream;
 using WhitespaceAnalyzer = Lucene.Net.Analysis.WhitespaceAnalyzer;
-using OffsetAttribute = Lucene.Net.Analysis.Tokenattributes.OffsetAttribute;
-using PayloadAttribute = Lucene.Net.Analysis.Tokenattributes.PayloadAttribute;
-using PositionIncrementAttribute = Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using IndexReader = Lucene.Net.Index.IndexReader;
@@ -68,9 +65,9 @@ namespace Lucene.Net.Search
 				private void  InitBlock(AnonymousClassAnalyzer enclosingInstance)
 				{
 					this.enclosingInstance = enclosingInstance;
-					posIncrAtt =  AddAttribute<PositionIncrementAttribute>();
-					termAtt =  AddAttribute<TermAttribute>();
-					offsetAtt =  AddAttribute<OffsetAttribute>();
+					posIncrAtt =  AddAttribute<IPositionIncrementAttribute>();
+					termAtt =  AddAttribute<ITermAttribute>();
+					offsetAtt =  AddAttribute<IOffsetAttribute>();
 				}
 				private AnonymousClassAnalyzer enclosingInstance;
 				public AnonymousClassAnalyzer Enclosing_Instance
@@ -85,9 +82,9 @@ namespace Lucene.Net.Search
 				private int[] INCREMENTS = new int[]{0, 2, 1, 0, 1};
 				private int i = 0;
 				
-				internal PositionIncrementAttribute posIncrAtt;
-				internal TermAttribute termAtt;
-				internal OffsetAttribute offsetAtt;
+				internal IPositionIncrementAttribute posIncrAtt;
+				internal ITermAttribute termAtt;
+				internal IOffsetAttribute offsetAtt;
 
                 protected override void Dispose(bool disposing)
                 {
@@ -386,18 +383,18 @@ namespace Lucene.Net.Search
 		
 		internal int i;
 		
-		internal PositionIncrementAttribute posIncrAttr;
-		internal PayloadAttribute payloadAttr;
-		internal TermAttribute termAttr;
+		internal IPositionIncrementAttribute posIncrAttr;
+		internal IPayloadAttribute payloadAttr;
+		internal ITermAttribute termAttr;
 		
 		public PayloadFilter(TokenStream input, System.String fieldName):base(input)
 		{
 			this.fieldName = fieldName;
 			pos = 0;
 			i = 0;
-			posIncrAttr =  input.AddAttribute<PositionIncrementAttribute>();
-			payloadAttr =  input.AddAttribute<PayloadAttribute>();
-			termAttr =  input.AddAttribute<TermAttribute>();
+			posIncrAttr =  input.AddAttribute<IPositionIncrementAttribute>();
+			payloadAttr =  input.AddAttribute<IPayloadAttribute>();
+			termAttr =  input.AddAttribute<ITermAttribute>();
 		}
 		
 		public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/Search/TestTermRangeQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/TestTermRangeQuery.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/TestTermRangeQuery.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/TestTermRangeQuery.cs Fri Apr 13 16:33:33
2012
@@ -16,14 +16,13 @@
  */
 
 using System;
-
+using Lucene.Net.Analysis.Tokenattributes;
 using NUnit.Framework;
 
 using Analyzer = Lucene.Net.Analysis.Analyzer;
 using TokenStream = Lucene.Net.Analysis.TokenStream;
 using Tokenizer = Lucene.Net.Analysis.Tokenizer;
 using WhitespaceAnalyzer = Lucene.Net.Analysis.WhitespaceAnalyzer;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using IndexWriter = Lucene.Net.Index.IndexWriter;
@@ -240,11 +239,11 @@ namespace Lucene.Net.Search
 			{
 				internal char[] buffer = new char[1];
 				internal bool done;
-				internal TermAttribute termAtt;
+				internal ITermAttribute termAtt;
 				
 				public SingleCharTokenizer(System.IO.TextReader r):base(r)
 				{
-					termAtt =  AddAttribute<TermAttribute>();
+					termAtt =  AddAttribute<ITermAttribute>();
 				}
 				
 				public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/Support/TestSerialization.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Support/TestSerialization.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Support/TestSerialization.cs (original)
+++ incubator/lucene.net/trunk/test/core/Support/TestSerialization.cs Fri Apr 13 16:33:33
2012
@@ -39,54 +39,6 @@ namespace Lucene.Net.Support
             Index();
         }
 
-        [Test]
-        public void MyTest()
-        {
-            var assm = Assembly.GetAssembly(typeof (Store.RAMDirectory));
-            var typeProperties = from t in assm.GetTypes()
-                             select new
-                                        {
-                                            Type = t,
-                                            Properties = t.GetProperties()
-                                        };
-            foreach (var typeProp in typeProperties)
-            {
-                foreach (var prop in typeProp.Properties.Where(p => p.Module.Name.StartsWith("Lucene.Net")))
-                {
-                    var getSize = -1;
-                    var setSize = -1;
-
-                    var getMethod = prop.GetGetMethod(true);
-                    if (getMethod != null)
-                    {
-                        var methodBody = getMethod.GetMethodBody();
-                        if (methodBody != null)
-                        {
-                            getSize = methodBody.GetILAsByteArray().Length;
-                        }
-                    }
-
-                    var setMethod = prop.GetSetMethod(true);
-                    if (setMethod != null)
-                    {
-                        var methodBody = setMethod.GetMethodBody();
-                        if (methodBody != null)
-                        {
-                            setSize = methodBody.GetILAsByteArray().Length;
-                        }
-                    }
-
-                    if (getSize > 23 || setSize > 23)
-                    {
-                        Console.WriteLine(typeProp.Type.FullName + " " + prop.Name);
-                        if (getSize > 0) Console.WriteLine("Get " + getSize);
-                        if (setSize > 0) Console.WriteLine("Set " + setSize);
-                        Console.WriteLine("===================");
-                    }
-                }
-            }
-        }
-
         void Index()
         {
             Lucene.Net.Index.IndexWriter wr = new Lucene.Net.Index.IndexWriter(dir, new Lucene.Net.Analysis.WhitespaceAnalyzer(),
Lucene.Net.Index.IndexWriter.MaxFieldLength.UNLIMITED);

Modified: incubator/lucene.net/trunk/test/core/Util/TestAttributeSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Util/TestAttributeSource.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Util/TestAttributeSource.cs (original)
+++ incubator/lucene.net/trunk/test/core/Util/TestAttributeSource.cs Fri Apr 13 16:33:33 2012
@@ -35,8 +35,8 @@ namespace Lucene.Net.Util
         {
             // init a first instance
             AttributeSource src = new AttributeSource();
-            TermAttribute termAtt = src.AddAttribute<TermAttribute>();
-            TypeAttribute typeAtt = src.AddAttribute<TypeAttribute>();
+            ITermAttribute termAtt = src.AddAttribute<ITermAttribute>();
+            ITypeAttribute typeAtt = src.AddAttribute<ITypeAttribute>();
             termAtt.SetTermBuffer("TestTerm");
             typeAtt.Type = "TestType";
             int hashCode = src.GetHashCode();
@@ -55,17 +55,17 @@ namespace Lucene.Net.Util
 
             // restore into an exact configured copy
             AttributeSource copy = new AttributeSource();
-            copy.AddAttribute<TermAttribute>();
-            copy.AddAttribute<TypeAttribute>();
+            copy.AddAttribute<ITermAttribute>();
+            copy.AddAttribute<ITypeAttribute>();
             copy.RestoreState(state);
             Assert.AreEqual(src.GetHashCode(), copy.GetHashCode(), "Both AttributeSources
should have same hashCode after restore");
             Assert.AreEqual(src, copy, "Both AttributeSources should be equal after restore");
 
             // init a second instance (with attributes in different order and one additional
attribute)
             AttributeSource src2 = new AttributeSource();
-            typeAtt = src2.AddAttribute<TypeAttribute>();
-            FlagsAttribute flagsAtt = src2.AddAttribute<FlagsAttribute>();
-            termAtt = src2.AddAttribute<TermAttribute>();
+            typeAtt = src2.AddAttribute<ITypeAttribute>();
+            IFlagsAttribute flagsAtt = src2.AddAttribute<IFlagsAttribute>();
+            termAtt = src2.AddAttribute<ITermAttribute>();
             flagsAtt.Flags = 12345;
 
             src2.RestoreState(state);
@@ -75,7 +75,7 @@ namespace Lucene.Net.Util
 
             // init a third instance missing one Attribute
             AttributeSource src3 = new AttributeSource();
-            termAtt = src3.AddAttribute<TermAttribute>();
+            termAtt = src3.AddAttribute<ITermAttribute>();
             try
             {
                 src3.RestoreState(state);
@@ -91,21 +91,21 @@ namespace Lucene.Net.Util
         public virtual void TestCloneAttributes()
         {
             AttributeSource src = new AttributeSource();
-            TermAttribute termAtt = src.AddAttribute<TermAttribute>();
-            TypeAttribute typeAtt = src.AddAttribute<TypeAttribute>();
+            ITermAttribute termAtt = src.AddAttribute<ITermAttribute>();
+            ITypeAttribute typeAtt = src.AddAttribute<ITypeAttribute>();
             termAtt.SetTermBuffer("TestTerm");
             typeAtt.Type = "TestType";
 
             AttributeSource clone = src.CloneAttributes();
             System.Collections.Generic.IEnumerator<Type> it = clone.GetAttributeTypesIterator().GetEnumerator();
             Assert.IsTrue(it.MoveNext());
-            Assert.AreEqual(typeof(TermAttribute), it.Current, "TermAttribute must be the
first attribute");
+            Assert.AreEqual(typeof(ITermAttribute), it.Current, "TermAttribute must be the
first attribute");
             Assert.IsTrue(it.MoveNext());
-            Assert.AreEqual(typeof(TypeAttribute), it.Current, "TypeAttribute must be the
second attribute");
+            Assert.AreEqual(typeof(ITypeAttribute), it.Current, "TypeAttribute must be the
second attribute");
             Assert.IsFalse(it.MoveNext(), "No more attributes");
 
-            TermAttribute termAtt2 = clone.GetAttribute<TermAttribute>();
-            TypeAttribute typeAtt2 = clone.GetAttribute<TypeAttribute>();
+            ITermAttribute termAtt2 = clone.GetAttribute<ITermAttribute>();
+            ITypeAttribute typeAtt2 = clone.GetAttribute<ITypeAttribute>();
             Assert.IsFalse(ReferenceEquals(termAtt2, termAtt), "TermAttribute of original
and clone must be different instances");
             Assert.IsFalse(ReferenceEquals(typeAtt2, typeAtt), "TypeAttribute of original
and clone must be different instances");
             Assert.AreEqual(termAtt2, termAtt, "TermAttribute of original and clone must
be equal");
@@ -116,12 +116,12 @@ namespace Lucene.Net.Util
         public virtual void TestToStringAndMultiAttributeImplementations()
         {
             AttributeSource src = new AttributeSource();
-            TermAttribute termAtt = src.AddAttribute<TermAttribute>();
-            TypeAttribute typeAtt = src.AddAttribute<TypeAttribute>();
+            ITermAttribute termAtt = src.AddAttribute<ITermAttribute>();
+            ITypeAttribute typeAtt = src.AddAttribute<ITypeAttribute>();
             termAtt.SetTermBuffer("TestTerm");
             typeAtt.Type = "TestType";
             Assert.AreEqual("(" + termAtt.ToString() + "," + typeAtt.ToString() + ")", src.ToString(),
"Attributes should appear in original order");
-            System.Collections.Generic.IEnumerator<AttributeImpl> it = src.GetAttributeImplsIterator().GetEnumerator();
+            System.Collections.Generic.IEnumerator<Attribute> it = src.GetAttributeImplsIterator().GetEnumerator();
             Assert.IsTrue(it.MoveNext(), "Iterator should have 2 attributes left");
             Assert.AreSame(termAtt, it.Current, "First AttributeImpl from iterator should
be termAtt");
             Assert.IsTrue(it.MoveNext(), "Iterator should have 1 attributes left");
@@ -131,7 +131,7 @@ namespace Lucene.Net.Util
             src = new AttributeSource();
             src.AddAttributeImpl(new Token());
             // this should not add a new attribute as Token implements TermAttribute, too
-            termAtt = src.AddAttribute<TermAttribute>();
+            termAtt = src.AddAttribute<ITermAttribute>();
             Assert.IsTrue(termAtt is Token, "TermAttribute should be implemented by Token");
             // get the Token attribute and check, that it is the only one
             it = src.GetAttributeImplsIterator().GetEnumerator();
@@ -148,17 +148,17 @@ namespace Lucene.Net.Util
         {
             AttributeSource src = new AttributeSource();
 
-            Assert.IsTrue(src.AddAttribute<TermAttribute>() is TermAttributeImpl,
+            Assert.IsTrue(src.AddAttribute<ITermAttribute>() is TermAttribute,
                           "TermAttribute is not implemented by TermAttributeImpl");
-            Assert.IsTrue(src.AddAttribute<OffsetAttribute>() is OffsetAttributeImpl,
+            Assert.IsTrue(src.AddAttribute<IOffsetAttribute>() is OffsetAttribute,
                           "OffsetAttribute is not implemented by OffsetAttributeImpl");
-            Assert.IsTrue(src.AddAttribute<FlagsAttribute>() is FlagsAttributeImpl,
+            Assert.IsTrue(src.AddAttribute<IFlagsAttribute>() is FlagsAttribute,
                           "FlagsAttribute is not implemented by FlagsAttributeImpl");
-            Assert.IsTrue(src.AddAttribute<PayloadAttribute>() is PayloadAttributeImpl,
+            Assert.IsTrue(src.AddAttribute<IPayloadAttribute>() is PayloadAttribute,
                           "PayloadAttribute is not implemented by PayloadAttributeImpl");
-            Assert.IsTrue(src.AddAttribute<PositionIncrementAttribute>() is PositionIncrementAttributeImpl,
+            Assert.IsTrue(src.AddAttribute<IPositionIncrementAttribute>() is PositionIncrementAttribute,
                           "PositionIncrementAttribute is not implemented by PositionIncrementAttributeImpl");
-            Assert.IsTrue(src.AddAttribute<TypeAttribute>() is TypeAttributeImpl,
+            Assert.IsTrue(src.AddAttribute<ITypeAttribute>() is TypeAttribute,
                           "TypeAttribute is not implemented by TypeAttributeImpl");
         }
 



Mime
View raw message