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); }
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); }
public StateTransitionTests(string environment) : base(environment) { env = environment; borrowerRegistration = CoreModelConstructors.CreateRegisterBorrowerRequest(); loanApplicationClient = new LoanApplicationClient(); bcdClient = new LoanApplicationBcdClient(); coreLoanApplicationStatusClient = new LoanApplicationStatusClient(); loanApplicationStateClient = new LoanApplicationStateClient(); }
// Register N borrowers public static void CreateNBorrowerApplicationsRandomSource(int number) { RegisterBorrowerRequest borrower; for (int x = 0; x < number; x++) { borrower = CoreModelConstructors.CreateRegisterBorrowerRequest(); RegisterBorrower(borrower); } }
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); }
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}."); }
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); }
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); }
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); }
public void SetUp() { borrowerRegistration = CoreModelConstructors.CreateRegisterBorrowerRequest(); emailAddress = borrowerRegistration.Borrower.EmailAddress; }
public PipelineAgentStatusAccessTests(string environment) : base(environment) { coreAgentClient = new AgentsClient(); borrowerRegistration = CoreModelConstructors.CreateRegisterBorrowerRequest(); env = environment; }