Ejemplo n.º 1
0
 public void Test_UsesTransactionCommitterDB()
 {
     //---------------Set up test pack-------------------
     
     //---------------Execute Test ----------------------
     DataAccessorDB dataAccessorDb = new DataAccessorDB();
     //---------------Test Result -----------------------
     Assert.IsInstanceOf(typeof(TransactionCommitterDB), dataAccessorDb.CreateTransactionCommitter());
     //---------------Tear down -------------------------
 }
Ejemplo n.º 2
0
 public void Test_StandardConstructor_UsesCurrentConnection()
 {
     //---------------Set up test pack-------------------
     DatabaseConnection.CurrentConnection = MockRepository.GenerateMock<IDatabaseConnection>();
     //---------------Execute Test ----------------------
     DataAccessorDB dataAccessorDb = new DataAccessorDB();
     //---------------Test Result -----------------------
     Assert.AreSame(DatabaseConnection.CurrentConnection, ((BusinessObjectLoaderDB)dataAccessorDb.BusinessObjectLoader).DatabaseConnection);
     Assert.AreSame(DatabaseConnection.CurrentConnection, ((TransactionCommitterDB)dataAccessorDb.CreateTransactionCommitter()).DatabaseConnection);
     //---------------Tear down -------------------------
 }