public virtual void  TestOverridesAny()
 {
     try
     {
         TokenStream stream = new WhitespaceTokenizer(new System.IO.StringReader(doc));
         stream = new AnonymousClassTokenFilter(this, stream);
         stream = new LowerCaseFilter(stream);
         stream = new StopFilter(stream, stopwords);
         while (stream.IncrementToken())
         {
             ;
         }
         Assert.Fail("One TokenFilter does not override any of the required methods, so it should fail.");
     }
     catch (System.NotSupportedException uoe)
     {
         Assert.IsTrue(uoe.Message.EndsWith("does not implement any of incrementToken(), next(Token), next()."));
     }
 }
Ejemplo n.º 2
0
		public virtual void  TestOverridesAny()
		{
			try
			{
				TokenStream stream = new WhitespaceTokenizer(new System.IO.StringReader(doc));
				stream = new AnonymousClassTokenFilter(this, stream);
				stream = new LowerCaseFilter(stream);
				stream = new StopFilter(stream, stopwords);
				while (stream.IncrementToken())
					;
				Assert.Fail("One TokenFilter does not override any of the required methods, so it should fail.");
			}
			catch (System.NotSupportedException uoe)
			{
				Assert.IsTrue(uoe.Message.EndsWith("does not implement any of incrementToken(), next(Token), next()."));
			}
		}