示例#1
0
        public void OptimizeWithParams()
        {
            var mocks = new MockRepository();
            var conn  = mocks.StrictMock <ISolrConnection>();

            Solr.Connection = conn;
            Solr.Optimize(true, true);
        }
示例#2
0
        public void OptimizeWithParams()
        {
            var conn = new MSolrConnection();

            conn.post      &= x => x.Args("/update", "<optimize waitSearcher=\"true\" waitFlush=\"true\" />");
            Solr.Connection = conn;
            Solr.Optimize(true, true);
            Assert.AreEqual(1, conn.post.Calls);
        }
示例#3
0
        public void Optimize()
        {
            var conn = new MSolrConnection();

            conn.post      &= x => x.Args("/update", "<optimize />");
            Solr.Connection = conn;
            Solr.Optimize();
            Assert.AreEqual(1, conn.post.Calls);
        }