Ejemplo n.º 1
0
        public static LoanApplicationCoreStateObject TransitionToReviewingState(RegisterBorrowerRequest borrowerRegistration)
        {
            var loanApplicationClient = new LoanApplicationClient();
            var statusUpdateClient    = new LoanApplicationStatusClient();
            var borrowerState         = GetBorrowerWithAllStipsButEmailAndBankverification(borrowerRegistration);
            var stateResult           = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());

            EmailVerification(borrowerState.LoanApplicationGuid.ToString(), borrowerRegistration.Borrower.EmailAddress);

            var statusUpdateResponse = statusUpdateClient.UpdateStatusJob();

            stateResult = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());

            var request = CoreModelConstructors.CreateCoreLinkBankAccountRequest("wells", (Guid)borrowerState.LoanApplicationGuid, "plaid_test", "plaid_good", PIEPER_JONES.Common.Enums.BankProvider.Plaid);

            BankLinking(borrowerState.LoanApplicationGuid.ToString(), (Guid)borrowerState.BorrowerGuid, borrowerRegistration, request);
            statusUpdateResponse = statusUpdateClient.UpdateStatusJob();
            stateResult          = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());
            borrowerState        = SubmitLoanApplication(borrowerState.LoanApplicationGuid.ToString(), borrowerRegistration);
            stateResult          = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());
            return(borrowerState);
        }
Ejemplo n.º 2
0
        public void AgentSearchQuoting()
        {
            emailAddress = GetRandomEmail();
            borrowerRegistration.Borrower.EmailAddress = emailAddress;
            var borrowerState = new LoanApplicationCoreStateObject();

            borrowerState = RegisterBorrower(borrowerRegistration);
            borrowerState = GetBorrowerToQuoting(borrowerRegistration, (Guid)borrowerState.LoanApplicationGuid);
            var stateResult = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());

            Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Quoting);
        }
        public void PipelineLoanStateRegistering()
        {
            var partialBorrowerResult = borrowersClient.PartialRegistration(borrowerRegistration);

            if (partialBorrowerResult == null)
            {
                Assert.Fail($"Could not create a partially registered borrower for email {emailAddress}.  Failing Test.");
            }
            var stateResult = loanApplicationClient.Status(partialBorrowerResult.content.LoanApplicationGuid.ToString());

            Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Registering);
            Assert.That(stateResult.content.LoanApplicationStatus == LoanApplicationStatus.RegistrationPending);
        }