Ejemplo n.º 1
0
 public void SetUp()
 {
     const string dbFile = @"test.mdb";
     var path = Path.GetFullPath(string.Format(@".\{0}", dbFile));
     this.transactionRepositoryMock = new Mock<ITransactionRepository>();
     this.transactionWatcher = new TransactionWatcher(path, this.transactionRepositoryMock.Object);
     this.transactionWatcher.OnNewTransactions += this.OnNewTransactions;
     this.connection = new OleDbConnection(string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Jet OLEDB:Database Password=XsControl", dbFile));
 }
Ejemplo n.º 2
0
 public AccessHub(ITransactionWatcher transactionWatcher)
 {
     lock (LockObject)
     {
         if (TransactionWatcher == null)
         {
             TransactionWatcher = transactionWatcher;
             TransactionWatcher.OnNewTransactions += this.OnNewTransactions;
         }
     }
 }