Пример #1
0
        public void Rollback()
        {
            var mocks       = new MockRepository();
            var basicServer = mocks.StrictMock <ISolrBasicOperations <TestDocument> >();

            With.Mocks(mocks)
            .Expecting(() => Expect.Call(basicServer.Rollback()).Return(new ResponseHeader()))
            .Verify(() => {
                var s = new SolrServer <TestDocument>(basicServer, null, null);
                s.Rollback();
            });
        }
Пример #2
0
        public void Rollback()
        {
            var basicServer = new MSolrBasicOperations <TestDocument>();

            basicServer.rollback += () => new ResponseHeader {
                QTime = 2
            };
            var s = new SolrServer <TestDocument>(basicServer, null, null);
            var r = s.Rollback();

            Assert.Equal(2, r.QTime);
            Assert.Equal(1, basicServer.rollback.Calls);
        }
Пример #3
0
 public void Rollback()
 {
     var mocks = new MockRepository();
     var basicServer = mocks.StrictMock<ISolrBasicOperations<TestDocument>>();
     With.Mocks(mocks)
         .Expecting(() => Expect.Call(basicServer.Rollback()).Return(new ResponseHeader()))
         .Verify(() => {
             var s = new SolrServer<TestDocument>(basicServer, null, null);
             s.Rollback();
         });
 }
Пример #4
0
 public void Rollback() {
     var basicServer = new MSolrBasicOperations<TestDocument>();
     basicServer.rollback += () => new ResponseHeader {QTime = 2};
     var s = new SolrServer<TestDocument>(basicServer, null, null);
     var r = s.Rollback();
     Assert.AreEqual(2, r.QTime);
     Assert.AreEqual(1, basicServer.rollback.Calls);
 }