first commit
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user