Пример #1
0
        public void Setup()
        {
            this.mocks = new MockRepository();
            this.mockConnection = this.mocks.StrictMock<Connection>();
            SetupResult.For(this.mockConnection.Database).Return("mock.edb");
            SetupResult.For(this.mockConnection.Name).Return("mock_instance");

            // Only the TestSqlImpl provides a method to set the connection
            var sqlImpl = new TestSqlImpl();
            sqlImpl.FTO_SetConnection(this.mockConnection);
            this.sqlImpl = sqlImpl;
        }
Пример #2
0
        public void Setup()
        {
            this.mocks          = new MockRepository();
            this.mockConnection = this.mocks.StrictMock <Connection>();
            SetupResult.For(this.mockConnection.Database).Return("mock.edb");
            SetupResult.For(this.mockConnection.Name).Return("mock_instance");

            // Only the TestSqlImpl provides a method to set the connection
            var sqlImpl = new TestSqlImpl();

            sqlImpl.FTO_SetConnection(this.mockConnection);
            this.sqlImpl = sqlImpl;
        }