Ejemplo n.º 1
0
        public void TermQueryRun()
        {
            var postings = new long[] { Utils.RandomInteger() };

            var runner = new Mock <IQueryRunner>();

            runner.Setup(x => x.Search("field", "value")).Returns(postings);

            var query = new TermQuery(new Term("field", "value"));

            CollectionAssert.AreEqual(postings, query.Run(runner.Object));
        }