public async Task MustCommitTheTransaction()
        {
            using var target = new DbTransactionAdapter <DbTransaction>(transaction.Object);
            await target.CommitAsync(CancellationToken.None);

            transaction.Verify(o => o.Commit(), Times.Once);
        }
        public void ThrowsExceptionWhenAlreadyDisposedOnRollback()
        {
            var target = new DbTransactionAdapter <DbTransaction>(transaction.Object);

            target.Dispose();

            Assert.ThrowsAsync <ObjectDisposedException>(async() => await target.RollbackAsync(CancellationToken.None));
        }
        public async Task MustRollbackTheTransaction()
        {
            using (var target = new DbTransactionAdapter <DbTransaction>(transaction.Object))
            {
                await target.RollbackAsync(CancellationToken.None);
            }

            transaction.Verify(o => o.Rollback(), Times.Once);
        }
 public void ReturnsTheUnderlyingTransactionAsExpected()
 {
     using var target = new DbTransactionAdapter <DbTransaction>(transaction.Object);
     Assert.AreEqual(transaction.Object, target.UnderlyingTransaction);
 }