Return-Path: Delivered-To: apmail-incubator-lucene-net-commits-archive@minotaur.apache.org Received: (qmail 78655 invoked from network); 17 Nov 2009 20:36:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Nov 2009 20:36:31 -0000 Received: (qmail 17127 invoked by uid 500); 17 Nov 2009 20:36:31 -0000 Delivered-To: apmail-incubator-lucene-net-commits-archive@incubator.apache.org Received: (qmail 17078 invoked by uid 500); 17 Nov 2009 20:36:31 -0000 Mailing-List: contact lucene-net-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@incubator.apache.org Delivered-To: mailing list lucene-net-commits@incubator.apache.org Received: (qmail 17069 invoked by uid 99); 17 Nov 2009 20:36:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2009 20:36:31 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2009 20:36:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 286A923888D8; Tue, 17 Nov 2009 20:36:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r881496 - /incubator/lucene.net/trunk/C#/src/Test/Analysis/TestTokenStreamBWComp.cs Date: Tue, 17 Nov 2009 20:36:08 -0000 To: lucene-net-commits@incubator.apache.org From: aroush@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091117203608.286A923888D8@eris.apache.org> 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