public void ThrowsExceptionWhenAlreadyDisposedOnRollback() { var target = new StubTransactionAdapter(transaction.Object); target.Dispose(); Assert.ThrowsAsync <ObjectDisposedException>(async() => await target.RollbackAsync(CancellationToken.None)); }
public async Task MustRollbackTheTransaction() { using (var target = new StubTransactionAdapter(transaction.Object)) { await target.RollbackAsync(CancellationToken.None); } transaction.Verify(o => o.Rollback(), Times.Once); }