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(); }); }
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); }
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(); }); }
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); }