public void Execute() { _commandExecutionContextMock.Expect(mock => mock.ExecuteReader(_dbCommandMock, CommandBehavior.SingleRow)).Return(_dataReaderMock); _commandExecutionContextMock.Replay(); _objectReaderMock.Expect(mock => mock.Read(_dataReaderMock)).Return(_fakeResult); _objectReaderMock.Replay(); _dbCommandBuilderMock.Expect(mock => mock.Create(_commandExecutionContextMock)).Return(_dbCommandMock); _dbCommandBuilderMock.Replay(); _dbCommandMock.Expect(mock => mock.Dispose()); _dbCommandMock.Replay(); var result = _command.Execute(_commandExecutionContextMock); _commandExecutionContextMock.VerifyAllExpectations(); _objectReaderMock.VerifyAllExpectations(); _dbCommandBuilderMock.VerifyAllExpectations(); _dbCommandMock.VerifyAllExpectations(); Assert.That(result, Is.SameAs(_fakeResult)); }