Exemplo n.º 1
0
        public void SetUp()
        {
            _factoryMock = new DynamicMock(typeof(ICommandFactory));
            _databaseMock = new DynamicMock(typeof(IDatabaseEngine));

            _database = (IDatabaseEngine)_databaseMock.MockInstance;
            _factory = (ICommandFactory)_factoryMock.MockInstance;

            _autoCommitMock = new DynamicMock(typeof(IExecutionState));
            _transactionalMock = new DynamicMock(typeof(ITransactionalExecutionState));

            IExecutionState autoCommitState = (IExecutionState) _autoCommitMock.MockInstance;
            ITransactionalExecutionState transactionalState = (ITransactionalExecutionState) _transactionalMock.MockInstance;

            _session = new DataSession(_database, _factory, autoCommitState, transactionalState);
        }
 public ReaderSourceCollection(DataSession session, ICommandFactory commandFactory)
 {
     _parent = session;
     _commandFactory = commandFactory;
     _sources = new Hashtable();
 }
 public ReaderSourceCollection(DataSession session, ICommandFactory commandFactory)
 {
     _parent         = session;
     _commandFactory = commandFactory;
     _sources        = new Hashtable();
 }
Exemplo n.º 4
0
 public CommandCollection(DataSession parent, ICommandFactory commandFactory)
 {
     _commandFactory = commandFactory;
     _parent = parent;
     _commands = new Hashtable();
 }
 public CommandCollection(DataSession parent, ICommandFactory commandFactory)
 {
     _commandFactory = commandFactory;
     _parent         = parent;
     _commands       = new Hashtable();
 }