public void NullAccountFailsValidation() { ChapsPaymentValidator sut = GetSystemUnderTest(); bool result = sut.ValidatePayment(null, It.IsAny <decimal>()); Assert.False(result); }
public void DoesNotAllowChapsFailsValidation(AllowedPaymentSchemes schemes) { ChapsPaymentValidator sut = GetSystemUnderTest(); Account account = _fixture.Create <Account>(); account.AllowedPaymentSchemes = schemes; bool result = sut.ValidatePayment(account, It.IsAny <decimal>()); Assert.False(result); }
public void AllowsChapsPassessValidation(AllowedPaymentSchemes schemes) { ChapsPaymentValidator sut = GetSystemUnderTest(); Account account = _fixture.Create <Account>(); account.Status = AccountStatus.Live; account.AllowedPaymentSchemes = schemes; bool result = sut.ValidatePayment(account, It.IsAny <decimal>()); Assert.True(result); }
public void NonLiveStatusFailsValidation(AccountStatus status) { ChapsPaymentValidator sut = GetSystemUnderTest(); Account account = _fixture.Create <Account>(); account.Status = status; account.AllowedPaymentSchemes = AllowedPaymentSchemes.Chaps; bool result = sut.ValidatePayment(account, It.IsAny <decimal>()); Assert.False(result); }