Lucene.Net.Search.TestTermScorer.TestNext C# (CSharp) Method

TestNext() private method

private TestNext ( ) : void
return void
		public virtual void  TestNext()
		{
			
			Term allTerm = new Term(FIELD, "all");
			TermQuery termQuery = new TermQuery(allTerm);
			
			Weight weight = termQuery.Weight(indexSearcher);
			
			TermScorer ts = new TermScorer(weight, indexReader.TermDocs(allTerm), indexSearcher.Similarity, indexReader.Norms(FIELD));
			Assert.IsTrue(ts.NextDoc() != DocIdSetIterator.NO_MORE_DOCS, "next did not return a doc");
			Assert.IsTrue(ts.Score() == 1.6931472f, "score is not correct");
			Assert.IsTrue(ts.NextDoc() != DocIdSetIterator.NO_MORE_DOCS, "next did not return a doc");
			Assert.IsTrue(ts.Score() == 1.6931472f, "score is not correct");
			Assert.IsTrue(ts.NextDoc() == DocIdSetIterator.NO_MORE_DOCS, "next returned a doc and it should not have");
		}