first commit
This commit is contained in:
@@ -0,0 +1,141 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
using CRIF.ACTion.Loan;
|
||||
using Landmark.OLA.Models.Addresses;
|
||||
using Landmark.OLA.Models.Addresses.Enums;
|
||||
using Landmark.OLA.Models.Assets;
|
||||
using Landmark.OLA.Models.Assets.Enums;
|
||||
using Landmark.OLA.Models.HomeMortgageDisclosureAct;
|
||||
using Landmark.OLA.Models.Individuals;
|
||||
using Landmark.OLA.Models.Individuals.Enums;
|
||||
using Landmark.OLA.Models.Loan;
|
||||
using Landmark.OLA.Models.Loan.Enums;
|
||||
using Landmark.OLA.Models.Residences;
|
||||
|
||||
namespace CRIF.ACTion.Tests.Loan
|
||||
{
|
||||
public class HelocFlexTest
|
||||
{
|
||||
|
||||
private readonly LoanApplication _loanApplication =
|
||||
new(loanDate: DateTime.Parse("2018-01-01T06:00:00.0000000Z", null, System.Globalization.DateTimeStyles.AssumeLocal), loanId: "7c0d9659-4d37-4ae7-93ce-e6c72ad6a0b5")
|
||||
{
|
||||
LoanType = LoanType.EQ_HELOC_Flex,
|
||||
Purpose = LoanPurpose.Purpose.Purchase,
|
||||
RequestedAmount = 1000,
|
||||
PrimaryContactMethod = "1234567890",
|
||||
DisclosureDate = DateTime.Parse("2019-03-08T19:50:26.429Z"),
|
||||
IPAddress = "111.11.1111",
|
||||
RealEstate = new RealEstate(realEstateId: new Guid("7c0d9659-4d37-4ae7-93ce-e6c72ad6a0b5"))
|
||||
{
|
||||
LienPosition = new LienPosition
|
||||
{
|
||||
HasFirstMortgage = true,
|
||||
HasSecondMortgage = true,
|
||||
PayoffFirstMortgage = false,
|
||||
PayoffSecondMortgage = true
|
||||
},
|
||||
CurrentlyBeingRemodeledOrImproved = false,
|
||||
CurrentlyListedForSale = false,
|
||||
InitialEstimatedValue = 250000m,
|
||||
Type = RealEstateType.SingleFamily,
|
||||
Use = PropertyUse.OwnerOccupied,
|
||||
RealEstateAddress = new Address(new Guid("f370b54c-5999-4ebc-b1b6-078cc8571652"))
|
||||
{
|
||||
Address1 = "123 Main St",
|
||||
City = "New Berlin",
|
||||
State = StateOption.WI,
|
||||
Country = CountryOption.UnitedStates,
|
||||
PostalCode = "53151",
|
||||
},
|
||||
},
|
||||
PrimaryBorrower = new Individual(new Guid("b0fb7c37-a203-4c06-89cb-e4e9f3ca20d4"))
|
||||
{
|
||||
Language = LanguageOption.English,
|
||||
FirstName = "Jane",
|
||||
MiddleInitial = "J",
|
||||
LastName = "Doe",
|
||||
DOB = new DateTime(2018, 01, 01),
|
||||
SSN = "666666666",
|
||||
Phone = "5555550100",
|
||||
PhoneType = PhoneType.Home,
|
||||
Email = "[email protected]",
|
||||
IsMarried = false,
|
||||
Address = new CurrentResidenceAddress(new Guid("66eecd56-4877-47d9-b2b1-45d11a087322"))
|
||||
{
|
||||
Address1 = "123 Main St",
|
||||
City = "New Berlin",
|
||||
State = StateOption.WI,
|
||||
Country = CountryOption.UnitedStates,
|
||||
PostalCode = "53151",
|
||||
MonthlyPayment = 1000m,
|
||||
MonthsResided = 120,
|
||||
ResidenceType = ResidenceTypeOption.Own,
|
||||
},
|
||||
HmdaValues = new Hmda
|
||||
{
|
||||
HmdaNoticeDisclosed = true,
|
||||
Races =
|
||||
[
|
||||
Race.NotProvided,
|
||||
],
|
||||
Ethnicities =
|
||||
[
|
||||
Ethnicity.OtherHispanicLatino,
|
||||
],
|
||||
OtherHispanicLatinoEthnicity = "Argentinean",
|
||||
Sexes =
|
||||
[
|
||||
Sex.Female,
|
||||
Sex.Male,
|
||||
],
|
||||
},
|
||||
Employers =
|
||||
[
|
||||
new Employer(employerId: new Guid("57df49cc-ff09-4660-aa47-54fdb5e08017"))
|
||||
{
|
||||
Language = LanguageOption.English,
|
||||
Name = "Purple Widgets Inc",
|
||||
CurrentEmployer = true,
|
||||
EmploymentType = EmploymentTypeOption.FullTime,
|
||||
MonthsEmployed = 120,
|
||||
StartDate = new DateTime(2008, 01, 01),
|
||||
EndDate = new DateTime(2018,01,01),
|
||||
Title = "Lead Widget Painter",
|
||||
Income = new Income
|
||||
{
|
||||
IncomeTypeCD = IncomeType.Salary,
|
||||
SourceName = "Job",
|
||||
AmountPerPeriod = 100m,
|
||||
Frequency = Frequency.Hourly,
|
||||
IncomeStatus = IncomeStatus.IncomeStatus_Included,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
};
|
||||
|
||||
[Fact]
|
||||
public void Validate()
|
||||
{
|
||||
var createAppElement = new LoanApplicationRequestBuilder(_loanApplication, TestCommon.GetTestSettings()).Build();
|
||||
|
||||
Assert.Empty(TestCommon.Validate(createAppElement));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CreateApplication()
|
||||
{
|
||||
var createAppElement = new LoanApplicationRequestBuilder(_loanApplication, TestCommon.GetTestSettings(),
|
||||
new Guid("741be6b4-9f42-4efd-871f-f5d99c0ef122"), new Guid("e814d860-14fe-4bef-be9b-21be3dce1edf"),
|
||||
new Guid("3090a5a1-d493-4865-ba44-8fd390dfec44"), new TestDistributionChannelLookupService()).Build();
|
||||
|
||||
string comparePath = "ExampleXML" + System.IO.Path.DirectorySeparatorChar + "HelocFlex" + System.IO.Path.DirectorySeparatorChar + "CreateApplication.xml";
|
||||
|
||||
var results = TestCommon.Compare(createAppElement, comparePath);
|
||||
|
||||
Assert.Empty(results);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user