Ejemplo n.º 1
0
 public void LocationFakerTest()
 {
     DisplayAndExecute(new Expression <Func <string> >[] {
         () => LocationFaker.City(),
         () => LocationFaker.Country(),
         () => LocationFaker.PostCode(),
         () => LocationFaker.Street(),
         () => LocationFaker.StreetName(),
         () => LocationFaker.ZipCode(),
     });
     DisplayAndExecute(new Expression <Func <int> >[] {
         () => LocationFaker.StreetNumber(),
     });
 }
Ejemplo n.º 2
0
        protected override void Seed(Model1 model1)
        {
            for (int i = 0; i < 10; i++)
            {
                Depo depo = new Depo
                {
                    Ad    = CompanyFaker.Name(),
                    Soyad = LocationFaker.Country()
                };
                model1.Depo.Add(depo);
            }

            model1.SaveChanges();
        }
Ejemplo n.º 3
0
        public static Product GetProduct()
        {
            var product = new Product()
            {
                Id           = Guid.NewGuid(),
                Category     = StringFaker.Alpha(10),
                Condition    = TextFaker.Sentences(4),
                Description  = TextFaker.Sentences(7),
                Name         = StringFaker.Alpha(40),
                Location     = LocationFaker.City(),
                Manufacturer = StringFaker.Alpha(25),
                Price        = NumberFaker.Number(1, 500)
            };

            return(product);
        }
Ejemplo n.º 4
0
        public void SetUp()
        {
            converter = new CustomerConverter();

            fakeEntity = new Customer
            {
                Id            = NumberFaker.Number(1, int.MaxValue),
                Name          = StringFaker.Alpha(25),
                StreetAddress = new Address
                {
                    Address1   = LocationFaker.Street(),
                    Address2   = LocationFaker.Street(),
                    City       = LocationFaker.City(),
                    State      = StringFaker.Alpha(2),
                    PostalCode = LocationFaker.PostCode(),
                    Country    = LocationFaker.Country()
                },
                BillingAddress = new Address
                {
                    Address1   = LocationFaker.Street(),
                    Address2   = LocationFaker.Street(),
                    City       = LocationFaker.City(),
                    State      = StringFaker.Alpha(2),
                    PostalCode = LocationFaker.PostCode(),
                    Country    = LocationFaker.Country()
                },
                OfficePhone1   = PhoneFaker.Phone(),
                OfficePhone2   = PhoneFaker.Phone(),
                OfficeFax      = PhoneFaker.Phone(),
                Email          = InternetFaker.Email(),
                PrimaryContact = new HumanContact
                {
                    FirstName = NameFaker.FirstName(),
                    LastName  = NameFaker.LastName(),
                    Email     = InternetFaker.Email(),
                    Fax       = PhoneFaker.Phone(),
                    Phone1    = PhoneFaker.Phone(),
                    Phone2    = PhoneFaker.Phone(),
                    Notes     = TextFaker.Sentence()
                },
                Notes = TextFaker.Sentences(5)
            };

            fakeViewModel = new CustomerViewModel
            {
                Id   = NumberFaker.Number(1, int.MaxValue),
                Name = StringFaker.Alpha(25),
                CanLicensePreReleaseVersions = BooleanFaker.Boolean(),
                StreetAddress = new Address
                {
                    Address1   = LocationFaker.Street(),
                    Address2   = LocationFaker.Street(),
                    City       = LocationFaker.City(),
                    State      = StringFaker.Alpha(2),
                    PostalCode = LocationFaker.PostCode(),
                    Country    = LocationFaker.Country()
                },
                BillingMatchesStreetAddress = BooleanFaker.Boolean(),
                BillingAddress = new Address
                {
                    Address1   = LocationFaker.Street(),
                    Address2   = LocationFaker.Street(),
                    City       = LocationFaker.City(),
                    State      = StringFaker.Alpha(2),
                    PostalCode = LocationFaker.PostCode(),
                    Country    = LocationFaker.Country()
                },
                OfficePhone1   = PhoneFaker.Phone(),
                OfficePhone2   = PhoneFaker.Phone(),
                OfficeFax      = PhoneFaker.Phone(),
                Email          = InternetFaker.Email(),
                PrimaryContact = new HumanContact
                {
                    FirstName = NameFaker.FirstName(),
                    LastName  = NameFaker.LastName(),
                    Email     = InternetFaker.Email(),
                    Fax       = PhoneFaker.Phone(),
                    Phone1    = PhoneFaker.Phone(),
                    Phone2    = PhoneFaker.Phone(),
                    Notes     = TextFaker.Sentence()
                },
                Notes = TextFaker.Sentences(5)
            };
        }
Ejemplo n.º 5
0
        public static string Street()
        {
            int num = LocationFaker.StreetNumber();

            return(string.Concat(num.ToString(), " ", LocationFaker.StreetName()));
        }