public void CompleteStreetNumber_Returns_Formatted_Street_Name_And_Street_Number(string locale) { var address = new RandomAddress(locale).GetAddress(); Assert.Equal($"{address.Street},{address.StreetNumber},{address.StreetNumber2}".TrimEnd(','), address.CompleteStreetNumber()); }
public EmployerInfo() { CompanyName = new CompanyName().Employer; EmployerAddress = new RandomAddress(); WorkPhoneNumber = new PhoneNumber(); PhoneNumber = WorkPhoneNumber.Formatted(); WorkEmail = new EmailAddress(CompanyName).Email; }
public Person() { Name = new PersonName(); DateOfBirth = GenerateRandomDateOfBirth(); Age = CalculateAge(); Gender = ConvertGenderToString(Name.Sex); Address = new RandomAddress(); PlaceOfBirth = GenerateRandomPlaceOfBirth(); Email = new EmailAddress().Email; SocialSecurityNumber = GenerateRandomSSN(); HomePhoneNumber = new PhoneNumber(); MobilePhoneNumber = new PhoneNumber(); MaritalStatus = GetRandomMaritalStatus(RandomlyPickMaritalStatus(), Name.Sex); EmploymentStatus = IsPersonEmployed(); Dependents = GenerateDependents(); Employer = new EmployerInfo(EmploymentStatus); }
public EmployerInfo(bool status) { if (status == false) { CompanyName = string.Empty; EmployerAddress = null; WorkPhoneNumber = null; WorkEmail = string.Empty; Position = string.Empty; } else { CompanyName = new CompanyName().Employer; EmployerAddress = new RandomAddress(); WorkPhoneNumber = new PhoneNumber(); PhoneNumber = WorkPhoneNumber.Formatted(); WorkEmail = new EmailAddress(CompanyName).Email; } }
public void GetAddress_Returns_Different_Addresses_When_Called_Twice(string locale) { var addresses = new RandomAddress(locale); Assert.NotEqual(addresses.GetAddress().DumpString(), addresses.GetAddress().DumpString()); }
/// <summary> /// Generates a random address to set City & State as Person's /// Place of Birth. /// </summary> /// <returns></returns> private string GenerateRandomPlaceOfBirth() { var a = new RandomAddress(); return($"{a.City}, {a.State}"); }