public void OptimizeWithParams() { var mocks = new MockRepository(); var conn = mocks.StrictMock <ISolrConnection>(); Solr.Connection = conn; Solr.Optimize(true, true); }
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); }
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); }