public void ShouldNotThrowException_WhenSufficientFundsAreAvailable() { Account sut = new AccountBuilder().WithBalance(10m); Assert.DoesNotThrow(() => { sut.EnsureSufficientFundsAreAvailable(5m); }); }
public void ShouldThrowException_WhenInsufficientFundsAreAvailable() { Account sut = new AccountBuilder().WithBalance(10m); Assert.Throws <InvalidOperationException>(() => { sut.EnsureSufficientFundsAreAvailable(20m); }); }