Exemplo n.º 1
0
        public FluencyConfiguration()
        {
            // Initialize default values.
            ConstructIdGenerator    = () => new StaticValueIdGenerator(0);
            DefaultValueConventions = new List <IDefaultConvention>
            {
                // Strings
                Convention.ByName("Firstname", p => ARandom.FirstName()),
                Convention.ByName("LastName", p => ARandom.LastName()),
                Convention.ByName("FullName", p => ARandom.FullName()),
                Convention.ByName("City", p => ARandom.City()),
                Convention.ByName("State", p => ARandom.StateCode()),
                Convention.ByName("Zip", p => ARandom.ZipCode()),
                Convention.ByName("ZipCode", p => ARandom.ZipCode()),
                Convention.ByName("PostalCode", p => ARandom.ZipCode()),
                Convention.ByName("Email", p => ARandom.Email()),
                Convention.ByName("Address", p => String.Format("{0} {1} {2}",
                                                                ARandom.IntBetween(10, 9999),
                                                                ARandom.LastName(),
                                                                ARandom.ItemFrom("Street", "Lane", "Ave.", "Blvd."))),
                Convention.ByName("Phone", p => ARandom.StringPattern("999-999-9999")),
                Convention.ByName("HomePhone", p => ARandom.StringPattern("999-999-9999")),
                Convention.ByName("WorkPhone", p => ARandom.StringPattern("999-999-9999")),
                Convention.ByName("BusinessPhone", p => ARandom.StringPattern("999-999-9999")),
                Convention.ByName("Fax", p => ARandom.StringPattern("999-999-9999")),
                Convention.String(20),
                // Dates
                Convention.ByName("BirthDate", p => ARandom.BirthDate()),
                Convention.DateType(),
                Convention.IntegerType(),
                Convention.ByType <Decimal>(p => ARandom.CurrencyAmount())
            };

            DotNetDefaultConventions = new List <IDefaultConvention>
            {
                Convention.Default()
            };
        }