public void NullAccountFailsValidation() { FasterPaymentValidator sut = GetSystemUnderTest(); bool result = sut.ValidatePayment(null, It.IsAny <decimal>()); Assert.False(result); }
public void AllowsFasterPassessValidation(AllowedPaymentSchemes schemes) { FasterPaymentValidator sut = GetSystemUnderTest(); Account account = _fixture.Create <Account>(); account.Balance = decimal.MaxValue; account.AllowedPaymentSchemes = schemes; bool result = sut.ValidatePayment(account, 10); Assert.True(result); }
public void LowBalanceFailsValidation(decimal balance, decimal amount) { FasterPaymentValidator sut = GetSystemUnderTest(); Account account = _fixture.Create <Account>(); account.Balance = balance; account.AllowedPaymentSchemes = AllowedPaymentSchemes.Chaps; bool result = sut.ValidatePayment(account, amount); Assert.False(result); }