Ejemplo n.º 1
0
        public void CanSetCustomDomainOnEmail()
        {
            var domain = "foofoofoobarbarbar.com";
            var email  = ContactInformation.Email(domain);

            Assert.Contains(domain, email);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Populate the specified property with a valid email address for a particular domain
        /// </summary>
        /// <typeparam name="T">The target object type</typeparam>
        /// <param name="configurator"></param>
        /// <param name="domain">The domain name for the email address</param>
        /// <returns>A configurator for the specified object type</returns>

        public static GenFuConfigurator <T> AsEmailAddressForDomain <T>(this GenFuStringConfigurator <T> configurator, string domain) where T : new()
        {
            CustomFiller <string> filler = new CustomFiller <string>(configurator.PropertyInfo.Name, typeof(T), () => ContactInformation.Email(domain));

            configurator.Maggie.RegisterFiller(filler);
            return(configurator);
        }
Ejemplo n.º 3
0
 public override object GetValue(object instance)
 {
     return(ContactInformation.Email());
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Populate the specified property with a valid email address
        /// </summary>
        /// <typeparam name="T">The target object type</typeparam>
        /// <param name="configurator"></param>
        /// <returns>A configurator for the specified object type</returns>
        public static AngieConfigurator <T> AsEmailAddress <T>(this AngieStringConfigurator <T> configurator) where T : new()
        {
            CustomFiller <string> filler = new CustomFiller <string>(configurator.PropertyInfo.Name, typeof(T), () => ContactInformation.Email());

            configurator.Maggie.RegisterFiller(filler);
            return(configurator);
        }