Esempio n. 1
0
        public virtual void  TestSubclassOverridingOnlyTokenStream()
        {
            Analyzer    a  = new MyStandardAnalyzer();
            TokenStream ts = a.ReusableTokenStream("field", new System.IO.StringReader("the"));

            // StandardAnalyzer will discard "the" (it's a
            // stopword), by my subclass will not:
            Assert.IsTrue(ts.IncrementToken());
            Assert.IsFalse(ts.IncrementToken());
        }
Esempio n. 2
0
		public virtual void  TestSubclassOverridingOnlyTokenStream()
		{
			Analyzer a = new MyStandardAnalyzer();
			TokenStream ts = a.ReusableTokenStream("field", new System.IO.StringReader("the"));
			// StandardAnalyzer will discard "the" (it's a
			// stopword), by my subclass will not:
			Assert.IsTrue(ts.IncrementToken());
			Assert.IsFalse(ts.IncrementToken());
		}