Пример #1
0
        public void TestBacsAccountAndPaymentSchemeIsNotBacsIsValid()
        {
            // Get Live Bacs Account
            Account account = GetDummyAccount(AccountStatus.Live, AllowedPaymentSchemes.Bacs, Convert.ToDecimal(200.43));

            // Get Bacs Request
            MakePaymentRequest request = new MakePaymentRequest
            {
                Amount        = Convert.ToDecimal(30.50),
                PaymentScheme = PaymentScheme.Chaps
            };

            var result = AccountValidator.CheckAccountIsValid(account, request);

            Assert.IsFalse(result);
        }
Пример #2
0
        public void TestFasterPaymentsAccountAndPaymentSchemeIsFasterPaymentsInsufficientFundsIsValid()
        {
            // Get Live Bacs Account
            Account account = GetDummyAccount(AccountStatus.Live, AllowedPaymentSchemes.FasterPayments, Convert.ToDecimal(25.42));

            // Get Bacs Request
            MakePaymentRequest request = new MakePaymentRequest
            {
                Amount        = Convert.ToDecimal(30.50),
                PaymentScheme = PaymentScheme.FasterPayments
            };

            var result = AccountValidator.CheckAccountIsValid(account, request);

            Assert.IsFalse(result);
        }
Пример #3
0
        public void TestNullAccountAndPaymentSchemeIsBacsIsValid()
        {
            // Get Null Account
            Account account = null;

            // Get Bacs Request
            MakePaymentRequest request = new MakePaymentRequest
            {
                Amount        = Convert.ToDecimal(30.50),
                PaymentScheme = PaymentScheme.Bacs
            };

            var result = AccountValidator.CheckAccountIsValid(account, request);

            Assert.IsFalse(result);
        }