public void AllegroBufforUrlQueueRunnable() { using (IDal db = new Dal()) { IBufforUrlQueueTask task = new AllegroBufforUrlQueue(); task.Run(db); } }
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); }