public void WhenChapsAccountStatusIsLive_WithBalance100_AndChapsRequestForAmmount99_Is_Made_Then_RulePasses() { var account = new Account() { Balance = 100, AccountNumber = "accountNumber", AllowedPaymentSchemes = AllowedPaymentSchemes.Chaps, Status = AccountStatus.Live }; var makePaymentRequest = new MakePaymentRequest() { Amount = 99, CreditorAccountNumber = "creditAccountNumber", PaymentDate = DateTime.Today, PaymentScheme = PaymentScheme.Chaps }; var ruleResult = _paymentSchemeChapsRule.Apply(account, makePaymentRequest); ruleResult.Should().BeTrue(); }
public void WhenBacsAccountStatusWithAnyStatus_WithBalance100_AndBacsRequestForAmmount99_Is_Made_Then_RulePasses() { var account = new Account() { AccountNumber = "accountNumber", AllowedPaymentSchemes = AllowedPaymentSchemes.Bacs, Balance = 100, Status = AccountStatus.Live }; var makePaymentRequest = new MakePaymentRequest() { Amount = 99, CreditorAccountNumber = "creditorAccountNumber", DebtorAccountNumber = "debtorAccountNumber", PaymentDate = DateTime.Today, PaymentScheme = PaymentScheme.Bacs }; var ruleResult = _paymentSchemeBacsRule.Apply(account, makePaymentRequest); ruleResult.Should().BeTrue(); }