Example #1
0
        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());
        }
Example #2
0
 public EmployerInfo()
 {
     CompanyName     = new CompanyName().Employer;
     EmployerAddress = new RandomAddress();
     WorkPhoneNumber = new PhoneNumber();
     PhoneNumber     = WorkPhoneNumber.Formatted();
     WorkEmail       = new EmailAddress(CompanyName).Email;
 }
Example #3
0
 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);
 }
Example #4
0
 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;
     }
 }
Example #5
0
        public void GetAddress_Returns_Different_Addresses_When_Called_Twice(string locale)
        {
            var addresses = new RandomAddress(locale);

            Assert.NotEqual(addresses.GetAddress().DumpString(), addresses.GetAddress().DumpString());
        }
Example #6
0
        /// <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}");
        }