Esempio n. 1
0
 public void AllegroBufforUrlQueueRunnable()
 {
     using (IDal db = new Dal())
     {
         IBufforUrlQueueTask task = new AllegroBufforUrlQueue();
         task.Run(db);
     }
 }
Esempio n. 2
0
        public void AllegroBufforUrlTransactionErrorRollbackIsInvoked()
        {
            Mock <IDal> db = new Mock <IDal>();

            db.Setup(x => x.BeginTransaction()).Throws <Exception>();
            db.Setup(x => x.RollbackTransaction()).Verifiable();

            IBufforUrlQueueTask task = new AllegroBufforUrlQueue();

            task.Run(db.Object);

            db.Verify(x => x.RollbackTransaction(), Times.Once);
        }