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 GetValidTestAddresses() { yield return new Object[] { GetValidAddress() }; } public static IEnumerable 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 }; } } }