コード例 #1
0
        public static LoanApplicationCoreStateObject GetBorrowerWithAllStipsButEmailAndBankverificationAuto(RegisterBorrowerRequest borrower, string address1, string address2, string city, string state, string zipCode, string currentEmployer, int lengthYears, string phoneNumber, string extension, string jobTitle, DateTime startDate, EmploymentStatus status)
        {
            var statusClient  = new LoanApplicationStatusClient();
            var filePath      = AppDomain.CurrentDomain.BaseDirectory.ToString() + "Resources\\";
            var borrowerState = RegisterBorrower(borrower);

            borrowerState = GetPrimaryOffer(borrowerState.Borrower, (Guid)borrowerState.LoanApplicationGuid, borrowerState.BorrowerGuid.ToString());
            var employmentUpdate = CoreModelConstructors.CreateUpdateEmploymentRequestAuto();

            EmploymentInformation(employmentUpdate, (Guid)borrowerState.BorrowerGuid);
            borrowerState.LoanApplicationStipsCompleted++;
            var statusNoContent = statusClient.UpdateStatusJob();

            IdentityVerification(borrowerState.LoanApplicationGuid.ToString(), filePath, "PhotoID.pdf", null);
            borrowerState.LoanApplicationStipsCompleted++;
            statusNoContent = statusClient.UpdateStatusJob();
            IncomeVerification(borrowerState.LoanApplicationGuid.ToString(), filePath, "W2.pdf", null);
            borrowerState.LoanApplicationStipsCompleted++;
            statusNoContent = statusClient.UpdateStatusJob();
            BankStatementVerification(borrowerState.LoanApplicationGuid.ToString(), filePath, "BankStatement.pdf", null);
            borrowerState.LoanApplicationStipsCompleted++;
            statusNoContent = statusClient.UpdateStatusJob();
            UpdateHomePayment(1700, GetRandomEnumValue <OccupancyStatus>(), borrowerState.BorrowerGuid.ToString());
            borrowerState.LoanApplicationStipsCompleted++;
            //Get all of these updated via the "batch job"
            statusNoContent = statusClient.UpdateStatusJob();
            return(borrowerState);
        }
コード例 #2
0
        public static LoanApplicationCoreStateObject GetBorrowerWithAllStipsButIDVerification(RegisterBorrowerRequest borrower, string employerAddress1, string employerAddress2, string employerCity, string employerState, string employerZipCode,
                                                                                              string currentEmployer, int lengthYears, string phoneNumber, string phoneExtension, string jobTitle, DateTime startDate, EmploymentStatus status)
        {
            var statusClient  = new LoanApplicationStatusClient();
            var filePath      = AppDomain.CurrentDomain.BaseDirectory.ToString() + "Resources\\";
            var fileName      = "logo.jpg";
            var borrowerState = RegisterBorrower(borrower);

            borrowerState = GetPrimaryOffer(borrowerState.Borrower, (Guid)borrowerState.LoanApplicationGuid, borrowerState.BorrowerGuid.ToString());
            var employmentUpdate = CoreModelConstructors.CreateUpdateEmploymentRequestAuto();

            EmploymentInformation(employmentUpdate, (Guid)borrowerState.BorrowerGuid);
            borrowerState.LoanApplicationStipsCompleted++;
            var statusNoContent = statusClient.UpdateStatusJob();

            //ID
            EmailVerification(borrowerState.BorrowerGuid.ToString(), borrowerState.Borrower.Borrower.EmailAddress);
            var request = CoreModelConstructors.CreateCoreLinkBankAccountRequest("wells", (Guid)borrowerState.LoanApplicationGuid, "plaid_test", "plaid_good", PIEPER_JONES.Common.Enums.BankProvider.Plaid);

            statusNoContent = statusClient.UpdateStatusJob();
            IncomeVerification(borrowerState.LoanApplicationGuid.ToString(), filePath, fileName, null);
            borrowerState.LoanApplicationStipsCompleted++;
            statusNoContent = statusClient.UpdateStatusJob();
            BankStatementVerification(borrowerState.LoanApplicationGuid.ToString(), filePath, fileName, null);
            borrowerState.LoanApplicationStipsCompleted++;
            statusNoContent = statusClient.UpdateStatusJob();
            UpdateHomePayment(1700, GetRandomEnumValue <OccupancyStatus>(), borrowerState.BorrowerGuid.ToString());
            borrowerState.LoanApplicationStipsCompleted++;
            //Get all of these updated via the "batch job"
            statusNoContent = statusClient.UpdateStatusJob();
            return(borrowerState);
        }
コード例 #3
0
 public StateTransitionTests(string environment) : base(environment)
 {
     env = environment;
     borrowerRegistration            = CoreModelConstructors.CreateRegisterBorrowerRequest();
     loanApplicationClient           = new LoanApplicationClient();
     bcdClient                       = new LoanApplicationBcdClient();
     coreLoanApplicationStatusClient = new LoanApplicationStatusClient();
     loanApplicationStateClient      = new LoanApplicationStateClient();
 }
コード例 #4
0
        // Register N borrowers
        public static void CreateNBorrowerApplicationsRandomSource(int number)
        {
            RegisterBorrowerRequest borrower;

            for (int x = 0; x < number; x++)
            {
                borrower = CoreModelConstructors.CreateRegisterBorrowerRequest();
                RegisterBorrower(borrower);
            }
        }
コード例 #5
0
        public static LoanApplicationCoreStateObject SubmitLoanApplication(string applicationGuid, RegisterBorrowerRequest borrower)
        {
            var loanApplicationClient = new LoanApplicationClient();
            var devinfo = new DeviceInfo();

            devinfo.BlackBoxId = "BlackBoxId".GetAppSetting();
            devinfo.IpAddress  = "127.0.0.1";
            SignAllPreLoanAppSubmitDocs(applicationGuid);
            var request = CoreModelConstructors.CreateLoanApplicationSubmitRequest(devinfo, 1, 1, 1, 1, borrower.Borrower.LastName);
            LoanApplicationCoreStateObject result = new LoanApplicationCoreStateObject();

            loanApplicationClient.SubmitLoanApplication(applicationGuid, request);
            result.ApplicaiontStatus   = LoanApplicationStatus.NewAppNeedInitialReview;
            result.ApplicationState    = LoanApplicationState.Reviewing;
            result.Borrower            = borrower;
            result.LoanApplicationGuid = new Guid(applicationGuid);
            return(result);
        }
コード例 #6
0
        public void PipelineLoanStateAllStipsButEmailVerificationAndBankLinking()
        {
            var statusUpdateClient = new LoanApplicationStatusClient();
            var borrowerState      = GetBorrowerWithAllStipsButEmailAndBankverification(borrowerRegistration);

            //All Stips are completed now besides Email and BankLinking...now fill out bank linking...
            var stateResult = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());

            Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Applying);
            Assert.That(stateResult.content.LoanApplicationStatus == LoanApplicationStatus.AppStipsPending);

            //Link Bank Account
            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);
            //All Stips but EmailVerification let's verifyEmail
            var statusUpdateResponse = statusUpdateClient.UpdateStatusJob();

            stateResult = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());
            Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Applying);

            //Now that we are down to one REAL stip, we check for EmailOnlyPending
            Assert.That(stateResult.content.LoanApplicationStatus == LoanApplicationStatus.EmailOnlyPending);

            //Verify The Email Address and check status again
            EmailVerification(borrowerState.LoanApplicationGuid.ToString(), borrowerRegistration.Borrower.EmailAddress);

            //We should now be ready for the AppSubmitPending status
            statusUpdateResponse = statusUpdateClient.UpdateStatusJob();
            stateResult          = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());
            Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Applying);
            Assert.That(stateResult.content.LoanApplicationStatus == LoanApplicationStatus.AppSubmitPending);

            //Ready to Submit the LoanApplication now
            SubmitLoanApplication(borrowerState.LoanApplicationGuid.ToString(), borrowerRegistration);
            stateResult          = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());
            statusUpdateResponse = statusUpdateClient.UpdateStatusJob();

            //Now to move to Review
            Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Reviewing);
            Assert.That(stateResult.content.LoanApplicationStatus == LoanApplicationStatus.NewAppNeedInitialReview, $"Did not successfully transition to status NewAppNeedInitialReview, status is {stateResult.content.LoanApplicationStatus}.");
        }
コード例 #7
0
        public static LoanApplicationCoreStateObject RegisterBorrower(RegisterBorrowerRequest borrower = null)
        {
            if (borrower == null)
            {
                borrower = CoreModelConstructors.CreateRegisterBorrowerRequest();
            }

            var  borrowersClient = new BorrowersClient();
            var  result          = borrowersClient.BorrowerRegistration(borrower);
            var  borrowerGuid    = (Guid)result.content.BorrowerGuid;
            Guid?applicationGuid = result.content.LoanApplicationGuid;
            var  returnObject    = new LoanApplicationCoreStateObject();

            returnObject.Borrower            = borrower;
            returnObject.BorrowerGuid        = borrowerGuid;
            returnObject.LoanApplicationGuid = applicationGuid;
            returnObject.ApplicaiontStatus   = LoanApplicationStatus.OfferSelectPending;
            returnObject.ApplicationState    = LoanApplicationState.Quoting;
            return(returnObject);
        }
コード例 #8
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);
        }
コード例 #9
0
        public void AgentSearchReviewing()
        {
            emailAddress = GetRandomEmail();
            borrowerRegistration.Borrower.EmailAddress = emailAddress;
            var borrowerState = GetBorrowerWithAllStipsButEmailAndBankverification(borrowerRegistration);
            var stateResult   = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());

            Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Applying);

            EmailVerification(borrowerState.LoanApplicationGuid.ToString(), borrowerRegistration.Borrower.EmailAddress);
            stateResult = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());
            Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Applying);

            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);
            stateResult = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());
            Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Applying);

            SubmitLoanApplication(borrowerState.LoanApplicationGuid.ToString(), borrowerRegistration);
            stateResult = loanApplicationClient.Status(borrowerState.LoanApplicationGuid.ToString());
            Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Reviewing);
        }
コード例 #10
0
 public void SetUp()
 {
     borrowerRegistration = CoreModelConstructors.CreateRegisterBorrowerRequest();
     emailAddress         = borrowerRegistration.Borrower.EmailAddress;
 }
コード例 #11
0
 public PipelineAgentStatusAccessTests(string environment) : base(environment)
 {
     coreAgentClient      = new AgentsClient();
     borrowerRegistration = CoreModelConstructors.CreateRegisterBorrowerRequest();
     env = environment;
 }