first commit

This commit is contained in:
Zeeshaun
2026-03-11 11:18:25 -05:00
commit f3cb730f3b
472 changed files with 53651 additions and 0 deletions
@@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using Landmark.OLA.Models.Addresses.Enums;
using Landmark.OLA.Models.Residences;
namespace Landmark.OLA.Tests.TestData
{
public class TestAddresses
{
public static CurrentResidenceAddress GetValidAddress()
{
return new CurrentResidenceAddress
{
Address1 = "123 Main St",
City = "New Berlin",
State = StateOption.WI,
PostalCode = "53151",
Country = CountryOption.UnitedStates,
ResidenceType = ResidenceTypeOption.Own,
MonthsResided = 18,
MonthlyPayment = 100,
};
}
public static IEnumerable<Object[]> GetValidTestAddresses()
{
yield return new Object[] { GetValidAddress() };
}
public static IEnumerable<Object[]> GetInvalidTestAddresses()
{
var address1Empty = GetValidAddress();
address1Empty.Address1 = " ";
yield return new Object[] { address1Empty };
var address1TooLong = GetValidAddress();
address1TooLong.Address1 = new string('x', 45); //45 char string
yield return new Object[] { address1TooLong };
var address2TooLong = GetValidAddress();
address2TooLong.Address2 = new string('x', 45); //45 char string
yield return new Object[] { address2TooLong };
var cityTooLong = GetValidAddress();
cityTooLong.City = new string('x', 105); //105 char string
yield return new Object[] { cityTooLong };
var postalCodeTooLong = GetValidAddress();
postalCodeTooLong.PostalCode = new string('x', 10); //10 char string
yield return new Object[] { postalCodeTooLong };
var missingState = GetValidAddress();
missingState.State = null;
yield return new Object[] { missingState };
var missingAddress1 = GetValidAddress();
missingAddress1.Address1 = null;
yield return new Object[] { missingAddress1 };
var missingCity = GetValidAddress();
missingCity.City = null;
yield return new Object[] { missingCity };
var missingPostalCode = GetValidAddress();
missingPostalCode.PostalCode = null;
yield return new Object[] { missingPostalCode };
var missingResidenceType = GetValidAddress();
missingResidenceType.ResidenceType = null;
yield return new Object[] { missingResidenceType };
var missingMonthsResided = GetValidAddress();
missingMonthsResided.MonthsResided = null;
yield return new Object[] { missingMonthsResided };
}
}
}
@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using Landmark.OLA.Models.Individuals;
using Landmark.OLA.Models.Individuals.Enums;
namespace Landmark.OLA.Tests.TestData
{
public class TestEmployers
{
private static Employer GetValidEmployer()
{
return new Employer
{
Name = "Test Employer",
Title = "QA",
WorkPhone = "9992245555",
Income = TestIncomes.GetValidEmploymentIncome(),
CurrentEmployer = false,
EmploymentType = EmploymentTypeOption.PartTime,
StartDate = new DateTime(2017, 10, 1),
};
}
public static IEnumerable<Object[]> GetValidTestEmployers()
{
yield return new Object[] { GetValidEmployer() };
}
public static IEnumerable<Object[]> GetInvalidTestEmployers()
{
var missingName = GetValidEmployer();
missingName.Name = null;
yield return new Object[] { missingName };
var invalidEmployerName = GetValidEmployer();
invalidEmployerName.Name+=".";
yield return new Object[] { invalidEmployerName };
}
}
}
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using Landmark.OLA.Models.Individuals;
using Landmark.OLA.Models.Individuals.Enums;
namespace Landmark.OLA.Tests.TestData
{
public class TestIncomes
{
private static Income GetValidIncome()
{
return new Income
{
IncomeTypeCD = IncomeType.Salary,
SourceName = "Salary",
AmountPerPeriod = 1000,
Frequency = Frequency.Monthly,
IncomeStatus = IncomeStatus.IncomeStatus_Included
};
}
public static Income GetValidEmploymentIncome()
{
return GetValidIncome();
}
public static IEnumerable<Object[]> GetValidTestIncomes()
{
yield return new Object[] { GetValidIncome() };
}
public static IEnumerable<Object[]> GetInvalidTestIncomes()
{
var missingSourceName = GetValidIncome();
missingSourceName.SourceName = null;
yield return new Object[] { missingSourceName };
}
}
}
@@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using Landmark.OLA.Models.Individuals;
using Landmark.OLA.Models.Individuals.Enums;
using Landmark.OLA.Tests.TestData;
namespace Landmark.OLA.Tests
{
public class TestIndividuals
{
private static Individual GetValidIndividual()
{
return new Individual
{
FirstName = "First",
LastName = "Last",
MiddleInitial = "M",
DOB = DateTime.Now,
SSN = "123456789",
Phone = "5551234567",
PhoneType = PhoneType.Home,
Email = "[email protected]",
IsMarried = true,
Address = TestAddresses.GetValidAddress(),
Language = LanguageOption.English,
};
}
public static IEnumerable<Object[]> GetValidTestIndividuals()
{
yield return new Object[] { GetValidIndividual() };
//Different but valid phone formatting
var phoneFormatting = GetValidIndividual();
phoneFormatting.Phone = "+1 (555) 123-4567 x123";
yield return new Object[] { phoneFormatting };
}
public static IEnumerable<Object[]> GetInvalidTestIndividuals()
{
var missingEmail = GetValidIndividual();
missingEmail.Email = null;
yield return new Object[] { missingEmail };
var missingDob = GetValidIndividual();
missingDob.DOB = null;
yield return new Object[] { missingDob };
var missingAddress = GetValidIndividual();
missingAddress.Address = null;
yield return new Object[] { missingAddress };
var badMI = GetValidIndividual();
badMI.MiddleInitial = "Name";
yield return new Object[] { badMI };
var missingPhoneType = GetValidIndividual();
missingPhoneType.PhoneType = null;
yield return new Object[] { missingPhoneType };
var invalidSssnChars = GetValidIndividual();
invalidSssnChars.SSN = "123-45-6789";
yield return new Object[] { invalidSssnChars };
}
}
}
@@ -0,0 +1,121 @@
{
"validLoans": [
{
"loanType": "V_Vehicle",
"note": "testing 2",
"primaryBorrower": {
"language": "English",
"firstName": "Joe",
"middleInitial": null,
"lastName": "TEST",
"dob": "01/01/1990",
"ssn": "123456789",
"phone": "1112223333",
"phoneType": "Home",
"secondaryPhone": null,
"secondaryPhoneType": null,
"email": "[email protected]",
"isMarried": false,
"address": {
"address1": "123 Main St",
"address2": "",
"city": "Milwaukee",
"state": "WI",
"postalCode": "53202",
"postalCodeExt": null,
"country": "UnitedStates",
"residenceType": "Own",
"monthsResided": 101,
"monthlyPayment": "500"
},
"previousAddresses": null,
"otherIncomes": [
{
"incomeTypeCD": "Other",
"sourceName": "IRA",
"frequency": "Annually",
"amountPerPeriod": "99999",
"incomeStatus": "IncomeStatus_Included"
}
],
"hasOptedOutTCPA": false,
"customerNumber": "0",
"employers": []
},
"purpose": "Purchase",
"requestedAmount": "5000",
"termLengthInMonths": "75",
"vehicle": {
"valuationType": "Manual",
"condition": "New",
"seller": "Dealer",
"type": "Automobile",
"year": "2030",
"mileage": "10",
"make": "Chevy",
"model": "Caprice classic",
"initialEstimatedValue": "50000"
}
},
{
"LoanType": "CC_CashBack",
"Purpose": "Other",
"RequestedAmount": "5000",
"PrimaryBorrower": {
}
},
{
"LoanType": "V_Vehicle",
"Purpose": "Purchase",
"TermLengthInMonths": "36",
"RequestedAmount": "5000",
"PrimaryBorrower": {},
"Vehicle": {
"Year": 0,
"Condition": "New",
"Type": "Automobile"
}
},
{
"LoanType": "P_Powersport",
"Purpose": "Purchase",
"TermLengthInMonths": "72",
"RequestedAmount": "8000",
"PrimaryBorrower": {},
"Vehicle": {
"ValuationType": "Manual",
"Condition": "Used",
"Type": "Snowmobile",
"Year": "2019",
"Make": "SKIDOO",
"Model": "MXZ",
"InitialEstimatedValue": "10500"
}
},
{
"LoanType": "V_Vehicle",
"Purpose": "Purchase",
"TermLengthInMonths": "36",
"RequestedAmount": "5000",
"PrimaryBorrower": {},
"Vehicle": {
"Year": 9999,
"Condition": "New",
"Type": "Automobile"
}
},
{
"LoanType": "V_Vehicle",
"Purpose": "Purchase",
"TermLengthInMonths": "36",
"RequestedAmount": "5000",
"PrimaryBorrower": {},
"Vehicle": {
"Year": 2010,
"Condition": "New",
"Type": "Automobile"
}
}
]
}
@@ -0,0 +1,45 @@
{
"vehicles": [
{
"Year": 0,
"Condition": "New",
"Type": "Automobile"
},
{
"Year": 9999,
"Condition": "New",
"Type": "Automobile"
},
{
"Year": 2009,
"Condition": "New",
"Type": "Automobile"
},
{
"Year": 2010,
"Condition": "New",
"Type": "Automobile"
},
{
"Year": 2018,
"Condition": "New",
"Type": "Automobile"
},
{
"Year": 2019,
"Condition": "New",
"Type": "Automobile"
},
{
"valuationType": "Manual",
"condition": "New",
"seller": "Dealer",
"type": "Automobile",
"year": "2030",
"mileage": "10",
"make": "Chevy",
"model": "Caprice classic",
"initialEstimatedValue": "50000"
}
]
}