Example #1
0
        public static string Name()
        {
            var names = from c in  ResourceLoader.Data(PropertyType.CompanyNames)
                        join i in ResourceLoader.Data(PropertyType.Industries) on 1 equals 1
                        select c + " " + i;

            return(names.GetRandomElement());
        }
Example #2
0
        /// <summary>
        /// Generates a random emails address
        /// </summary>
        /// <returns>A complete email address with a random account and domain.</returns>
        public static string Email()
        {
            int firstNameIndex  = _random.Next(0, ResourceLoader.Data(Properties.FirstNames).Count());
            int lastNameIndex   = _random.Next(0, ResourceLoader.Data(Properties.LastNames).Count());
            int domainNameIndex = _random.Next(0, ResourceLoader.Data(Properties.Domains).Count());

            // failing test on names with spaces
            string firstname = ResourceLoader.Data(Properties.FirstNames)[firstNameIndex].Replace(" ", "");
            string lastname  = ResourceLoader.Data(Properties.LastNames)[lastNameIndex].Replace(" ", "");

            return(string.Format("{0}.{1}@{2}", firstname, lastname, ResourceLoader.Data(Properties.Domains)[domainNameIndex]));
        }
Example #3
0
        public static string AddressLine()
        {
            var suffixes = new List <string> {
                "NW", "N", "NE", "E", "SE", "S", "SW", "W"
            };

            var number = _random.Next(100, 9999);

            number = _random.Next(1, 5) == 5 ? _random.Next(100, 99999) : number;

            var streetName = GetRandomValue(ResourceLoader.Data(PropertyType.StreetNames));
            var direction  = _random.Next(1, 1) > 8 ? GetRandomValue(suffixes) : string.Empty;

            var result = string.Format("{0} {1} {2}", number, streetName, direction);

            return(result);
        }
Example #4
0
 public static string UsaState()
 {
     return(GetRandomValue(ResourceLoader.Data(Properties.UsaStates)));
 }
Example #5
0
 public static string Injury()
 {
     return(GetRandomValue(ResourceLoader.Data(Properties.Injuries)));
 }
Example #6
0
 public static string Gender()
 {
     return(GetRandomValue(ResourceLoader.Data(Properties.Genders)));
 }
Example #7
0
 public static string Title()
 {
     return(GetRandomValue(ResourceLoader.Data(Properties.Titles)));
 }
Example #8
0
        public static string Name()
        {
            int index = _random.Next(0, ResourceLoader.Data(PropertyType.MusicArtists).Count());

            return(ResourceLoader.Data(PropertyType.MusicArtists)[index]);
        }
Example #9
0
 public static string Ingredient()
 {
     return(GetRandomValue(ResourceLoader.Data(Properties.Ingredients)));
 }
Example #10
0
 public static string LastName()
 {
     return(GetRandomValue(ResourceLoader.Data(PropertyType.LastNames)));
 }
Example #11
0
 public static string City()
 {
     return(GetRandomValue(ResourceLoader.Data(PropertyType.CityNames)));
 }
Example #12
0
 public static string CanadianProvinceAbreviation()
 {
     return(GetRandomValue(ResourceLoader.Data(PropertyType.CanadianProvinceAbreviations)));
 }
Example #13
0
 public static string MedicalProcedure()
 {
     return(GetRandomValue(ResourceLoader.Data(Properties.MedicalProcedures)));
 }
Example #14
0
 private static string GenerateWord()
 {
     return(GetRandomValue(ResourceLoader.Data(PropertyType.Lorem)));
 }
Example #15
0
 /// <summary>
 /// Generates a random twitter handle
 /// </summary>
 /// <returns></returns>
 public static string Twitter()
 {
     return(string.Format("@{0}{1}",
                          ResourceLoader.Data(Properties.FirstNames).GetRandomElement().ToCharArray().First(),
                          ResourceLoader.Data(Properties.LastNames).GetRandomElement()));
 }
Example #16
0
 public static string PersonTitle()
 {
     return(GetRandomValue(ResourceLoader.Data(PropertyType.PersonTitles)));
 }
Example #17
0
 /// <summary>
 /// Only uses the specified domain for email generation
 /// </summary>
 /// <param name="domain">The domain that you want to have for all email addresses</param>
 /// <returns>A complete email address for the specified domain.</returns>
 public static string Email(string domain)
 {
     return(string.Format("{0}.{1}@{2}", GetRandomValue(ResourceLoader.Data(Properties.FirstNames)), GetRandomValue(ResourceLoader.Data(Properties.LastNames)), domain));
 }
Example #18
0
 public static string UsaStateAbreviation()
 {
     return(GetRandomValue(ResourceLoader.Data(PropertyType.UsaStateAbreviations)));
 }
Example #19
0
 public static string CanadianProvince()
 {
     return(GetRandomValue(ResourceLoader.Data(Properties.CanadianProvinces)));
 }
Example #20
0
 public static string DomainName()
 {
     return(GetRandomValue(ResourceLoader.Data(Properties.Domains)));
 }
Example #21
0
 public static string FirstName()
 {
     return(GetRandomValue(ResourceLoader.Data(Properties.FirstNames)));
 }
Example #22
0
 public static string Drug()
 {
     return(GetRandomValue(ResourceLoader.Data(PropertyType.Drugs)));
 }
Example #23
0
        public static string Title()
        {
            int index = _random.Next(0, ResourceLoader.Data(Properties.MusicAlbums).Count());

            return(ResourceLoader.Data(Properties.MusicAlbums)[index]);
        }