lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r881496 - /incubator/lucene.net/trunk/C#/src/Test/Analysis/TestTokenStreamBWComp.cs
Date Tue, 17 Nov 2009 20:36:08 GMT
Author: aroush
Date: Tue Nov 17 20:36:07 2009
New Revision: 881496

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

Modified:
    incubator/lucene.net/trunk/C#/src/Test/Analysis/TestTokenStreamBWComp.cs

Modified: incubator/lucene.net/trunk/C#/src/Test/Analysis/TestTokenStreamBWComp.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Analysis/TestTokenStreamBWComp.cs?rev=881496&r1=881495&r2=881496&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Analysis/TestTokenStreamBWComp.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Analysis/TestTokenStreamBWComp.cs Tue Nov 17 20:36:07
2009
@@ -324,31 +324,6 @@
 			}
 		}
 		
-		public interface SenselessAttribute:Attribute
-		{
-		}
-		
-		public sealed class SenselessAttributeImpl:AttributeImpl, TestTokenStreamBWComp.SenselessAttribute
-		{
-			public override void  CopyTo(AttributeImpl target)
-			{
-			}
-			
-			public override void  Clear()
-			{
-			}
-			
-			public  override bool Equals(System.Object o)
-			{
-				return (o is SenselessAttributeImpl);
-			}
-			
-			public override int GetHashCode()
-			{
-				return 0;
-			}
-		}
-		
 		// test if tokenization fails, if only the new API is allowed and an old TokenStream is
in the chain
         [Test]
 		public virtual void  TestOnlyNewAPI()
@@ -387,7 +362,7 @@
 				Assert.IsTrue(stream2.AddAttribute(typeof(PayloadAttribute)) is PayloadAttributeImpl,
"PayloadAttribute is implemented by PayloadAttributeImpl");
 				Assert.IsTrue(stream2.AddAttribute(typeof(PositionIncrementAttribute)) is PositionIncrementAttributeImpl,
"PositionIncrementAttribute is implemented by PositionIncrementAttributeImpl");
 				Assert.IsTrue(stream2.AddAttribute(typeof(TypeAttribute)) is TypeAttributeImpl, "TypeAttribute
is implemented by TypeAttributeImpl");
-				Assert.IsTrue(stream2.AddAttribute(typeof(TestTokenStreamBWComp.SenselessAttribute))
is SenselessAttributeImpl, "SenselessAttribute is not implemented by SenselessAttributeImpl");
+				Assert.IsTrue(stream2.AddAttribute(typeof(SenselessAttribute)) is SenselessAttributeImpl,
"SenselessAttribute is not implemented by SenselessAttributeImpl");
 				
 				// try to call old API, this should fail
 				try
@@ -428,7 +403,7 @@
 				Assert.IsTrue(stream2.AddAttribute(typeof(PositionIncrementAttribute)) is TokenWrapper,
"PositionIncrementAttribute is implemented by TokenWrapper");
 				Assert.IsTrue(stream2.AddAttribute(typeof(TypeAttribute)) is TokenWrapper, "TypeAttribute
is implemented by TokenWrapper");
 				// This one is not implemented by TokenWrapper:
-				Assert.IsTrue(stream2.AddAttribute(typeof(TestTokenStreamBWComp.SenselessAttribute))
is SenselessAttributeImpl, "SenselessAttribute is not implemented by SenselessAttributeImpl");
+				Assert.IsTrue(stream2.AddAttribute(typeof(SenselessAttribute)) is SenselessAttributeImpl,
"SenselessAttribute is not implemented by SenselessAttributeImpl");
 			}
 			finally
 			{
@@ -455,4 +430,29 @@
 			}
 		}
 	}
+		
+	public interface SenselessAttribute:Attribute
+	{
+	}
+	
+	public sealed class SenselessAttributeImpl:AttributeImpl, SenselessAttribute
+	{
+		public override void  CopyTo(AttributeImpl target)
+		{
+		}
+		
+		public override void  Clear()
+		{
+		}
+		
+		public  override bool Equals(System.Object o)
+		{
+			return (o is SenselessAttributeImpl);
+		}
+		
+		public override int GetHashCode()
+		{
+			return 0;
+		}
+	}
 }
\ No newline at end of file



Mime
View raw message