Beispiel #1
0
        public void Execute(string id)
        {
            Domain.PaymentAccount paymentAccount = _paymentAccountService.GetPaymentAccount(id);

            _logger.Log(LogLevel.Info, String.Format("Processing Payment Account {0} with Status {1}", paymentAccount.Id, paymentAccount.AccountStatus.ToString()));
            switch (paymentAccount.AccountStatus)
            {
            case Domain.AccountStatusType.Submitted:

                SubmittedPaymentAccountProcessor processor = new SubmittedPaymentAccountProcessor(_ctx, _emailService);

                processor.Process(paymentAccount);

                break;
            }
            _logger.Log(LogLevel.Info, String.Format("Finished Processing Payment Account {0} with Status {1}", paymentAccount.Id, paymentAccount.AccountStatus.ToString()));
        }
Beispiel #2
0
        public void WhenNewAccountIsAddedPaymentVerificationDepositAmountsAreDifferent()
        {
            _ctx = new FakeDbContext();

            UserService                      userService           = new UserService(_ctx);
            IEmailService                    emailService          = null;
            PaymentAccountService            paymentAccountService = new PaymentAccountService(_ctx);
            SubmittedPaymentAccountProcessor processor             = new SubmittedPaymentAccountProcessor(_ctx, emailService);

            Guid userId = Guid.NewGuid();

            var user           = userService.AddUser(userId, "jrhodes621", "james123", "*****@*****.**", "1234");
            var paymentAccount = paymentAccountService.AddPaymentAccount(userId.ToString(), "James G Rhodes", "053000219", "1234123412",
                                                                         "Checking");

            processor.Process(paymentAccount);

            var paymentAccountVerification = _ctx.PaymentAccountVerifications.ElementAt(0);

            Assert.AreNotEqual(paymentAccountVerification.DepositAmount1, paymentAccountVerification.DepositAmount2);
        }