public void ShouldNotThrowException_WhenPayInLimitIsNotExceeded() { Account sut = new AccountBuilder().WithPaidIn(2000m); Assert.DoesNotThrow(() => { sut.EnsurePayInLimitIsNotExceeded(2000m); }); }
public void ShouldThrowException_WhenPayInLimitIsExceeded() { Account sut = new AccountBuilder().WithPaidIn(2000m); Assert.Throws <InvalidOperationException>(() => { sut.EnsurePayInLimitIsNotExceeded(3000m); }); }