Ejemplo n.º 1
0
        public void TestDataAccessorDB_CreateTransactionCommitter()
        {
            //---------------Set up test pack-------------------

            //---------------Execute Test ----------------------
            IDataAccessor dataAccessor = new DataAccessorDB();

            //---------------Test Result -----------------------
            Assert.IsInstanceOf(typeof(TransactionCommitterDB), dataAccessor.CreateTransactionCommitter());
            //---------------Tear Down -------------------------
        }
Ejemplo n.º 2
0
        public void Test_Constructor_UsesPassedInDatabaseConnection()
        {
            //---------------Set up test pack-------------------
            IDatabaseConnection connection = MockRepository.GenerateMock <IDatabaseConnection>();
            //---------------Execute Test ----------------------
            DataAccessorDB dataAccessorDb = new DataAccessorDB(connection);

            //---------------Test Result -----------------------
            Assert.AreSame(connection, ((BusinessObjectLoaderDB)dataAccessorDb.BusinessObjectLoader).DatabaseConnection);
            Assert.AreSame(connection, ((TransactionCommitterDB)dataAccessorDb.CreateTransactionCommitter()).DatabaseConnection);
            //---------------Tear down -------------------------
        }