public void PipelineLoanStateTransitionRegisteringToWithdrawn() { 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.GetLoanApplication(partialBorrowerResult.content.LoanApplicationGuid.ToString()); Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Registering); Assert.That(stateResult.content.LoanApplicationStatus == LoanApplicationStatus.RegistrationPending); int emailCount = GetEmails(emailAddress).Count; var stateClient = new LoanApplicationStateClient(); var noContent = new ResponseObject <EmptyResult>(); noContent = stateClient.ChangeStateToWithdraw(partialBorrowerResult.content.LoanApplicationGuid.ToString()); Assert.That(noContent.statusCode == HttpStatusCode.OK); stateResult = loanApplicationClient.GetLoanApplication(partialBorrowerResult.content.LoanApplicationGuid.ToString()); Assert.That(stateResult.content.LoanApplicationState == LoanApplicationState.Withdrawn); List <string> emails = GetEmails(emailAddress); Assert.That(emails.Count > emailCount); }
public static ResponseObject <GetOffersResponse> UpdateLoanApplicationPassStips(string loanApplicationGuid) { var loanAppClient = new LoanApplicationClient(); var loanApp = loanAppClient.GetLoanApplication(loanApplicationGuid); var saveLoanAppRequest = new UpdateLoanApplicationRequest(); saveLoanAppRequest.LoanApplication = loanApp.content; saveLoanAppRequest.LoanApplicationVerificationFlags = new LoanApplicationVerificationFlags(); saveLoanAppRequest.LoanApplicationVerificationFlags.AccountHolderVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.AccountNumberVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.AddressVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.DobVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.EmailVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.EmployerNameVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.EmploymentStatusVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.NameVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.OtherContactNumberVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.OwnRentVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.PrimaryPhoneNumberVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.SsnVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.WorkAddressVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.WorkPhoneNumberVerified = true; saveLoanAppRequest.VerifiedBorrowerIncome = loanApp.content.LoanFile.Borrowers[0].AnnualIncome; saveLoanAppRequest.VerifiedBorrowerDebt = loanApp.content.LoanFile.Debt[0].Amount; //saveLoanAppRequest.VerifiedBorrowerIncome //Dispositions for uploaded files var docGuids = GetFileUploadGuids(loanApplicationGuid); foreach (string dg in docGuids) { ResponseObject <EmptyResult> disposition = new UploadedDocumentsClient().DocumentDisposition(dg, "Pass"); } var findAlertsRequest = new SearchAlertFlagsRequest(); findAlertsRequest.LoanApplicationGuid = new Guid(loanApplicationGuid); var alertsClient = new AlertFlagClient(); var alerts = alertsClient.AlertFlagSearch(findAlertsRequest); var agentGuid = (Guid)GetAgentByUserName("uw").agentGuid; var agent = GetAgentByUserName("uw"); if (ClearAlerts(alerts.content, agent) == false) { Assert.Fail("Cannot continue because alerts could not be cleared."); } var findDataObjectsRequest = new SearchDataObjectRequest(); findDataObjectsRequest.LoanApplicationGuid = new Guid(loanApplicationGuid); var dataObjectClient = new DataObjectClient(); var dataObjects = dataObjectClient.DataObjectSearch(findDataObjectsRequest); if (DispositionDataObjects(dataObjects.content, agent, Disposition.FalsePositive) == false) { Assert.Fail("Cannot continue because data object could not be dispositioned."); } var response = loanAppClient.SaveLoanApplicationUW(saveLoanAppRequest); var hardPullResponse = new LoanApplicationThirdPartyClient().RunHardPull(loanApplicationGuid); var reprice = new LoanApplicationOffersClient().Reprice(loanApplicationGuid); return(reprice); }